Skip to content

Installation

  • CS-Cart or CS-Cart Multi-Vendor 4.17.2 – 4.21.x (CS-Cart, CS-Cart Ultimate, Multi-Vendor, Multi-Vendor Ultimate).
  • PHP 7.2.5 – 8.3, as supported by your CS-Cart version.
  • MySQL/MariaDB with InnoDB (the add-on tables use it; the rest of CS-Cart is unchanged).
  • A way to run a cron job (optional): without it you run the rules from the admin panel.

Bought on cs-cart.kaviolabs.com: sign in and open My licenses; the add-on has its own row with the license key and Downloads with the archive kv_data_retention-<version>.zip. Bought on the CS-Cart Marketplace: download the archive from your Marketplace account; the Marketplace license number works as the license key.

  1. Make a database backup. Retention rules change data; a backup is the only undo.
  2. Go to Add-ons → Manage add-ons, click the + (upload) button and upload kv_data_retention-<version>.zip.
  3. Find Data Retention & Guest Anonymizer in the list and click Install.
  4. Enter your license key in Settings → License (or the CS-Cart Marketplace license number in Add-ons → Manage add-ons).
  5. Open Administration → Data retention. The page starts in dry run mode: nothing is changed until you switch live mode on in the settings.
  6. Click Add the starting set (paused) for six sample rules, or add rules one by one. See Usage.
Item Details
Tables kv_dr_rules, kv_dr_marks, kv_dr_runs, kv_dr_audit
Privileges View data retention rules and history, Manage data retention (group “Data retention”)
Menu Administration → Data retention (next to Logs)
Rules None. The add-on never creates an active rule.

CS-Cart Ultimate: one license covers every storefront of the installation. The licensed domain is the store’s main domain without www.. Data retention works on the data of all storefronts, so choose All storefronts in the storefront selector to open the page.

Rules run when you press Run now and, if you set up cron, automatically, but only for records approved by a preview (valid 30 days): preview your rules again at least every 30 days, or cron skips them. Add this to your crontab, for example once a night (the exact command, with your path and cron password, is shown in Settings → Cron job):

0 3 * * * php /path/to/store/admin.php --dispatch=kv_data_retention.cron

Or request the URL https://yourstore.com/admin.php?dispatch=kv_data_retention.cron&cron_password=<your cron password> (the password is the core one from Settings → Security settings). While live mode is off, the job only counts what would happen and writes a dry-run entry to the history.

Upload the new package over the installed add-on (or use the Upgrade Center). Rules, history and the audit log are kept; missing tables, settings and texts are added automatically on the next admin page view.

  • Disable or switch off Enable in the settings: nothing runs any more, not even a preview. Rules, history and audit log stay.
  • Uninstall removes the add-on’s tables (rules, marks, run history, audit log), settings, privileges and texts. Export the audit log (CSV) first if you need to keep a record of what was done. The data that rules already anonymized or deleted stays that way: an uninstall cannot bring it back.