Installation
Requirements
Section titled “Requirements”- CS-Cart or CS-Cart Multi-Vendor 4.17.2 – 4.22.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.
Download
Section titled “Download”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.
Install
Section titled “Install”- Make a database backup. Retention rules change data; a backup is the only undo.
- Go to Add-ons → Manage add-ons, click the + (upload) button and upload
kv_data_retention-<version>.zip. - Find Data Retention & Guest Anonymizer in the list and click Install.
- Enter your license key in Settings → License (or the CS-Cart Marketplace license number in Add-ons → Manage add-ons).
- Open Administration → Data retention. The page starts in dry run mode: nothing is changed until you switch live mode on in the settings.
- Click Add the starting set (paused) for six sample rules, or add rules one by one. See Usage.
What the installation creates
Section titled “What the installation creates”| Item | Details |
|---|---|
| Tables | kv_dret_rules, kv_dret_marks, kv_dret_runs, kv_dret_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.
Schedule the cron job
Section titled “Schedule the cron job”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.cronOr 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.
Upgrading
Section titled “Upgrading”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.
Updating from 1.0.0: the tables were renamed from kv_dr_* to kv_dret_* (1.0.0 shared the name kv_dr_rules with Discount Rules). Your rules, run history, audit log and anonymization marks move automatically on the first admin page after the update; if Discount Rules is installed too, only Data Retention rows are moved and Discount Rules’ promotion rules stay. Update Discount Rules to 1.0.1 or later as well.
Disabling and uninstalling
Section titled “Disabling and uninstalling”- 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.