Installation
Requirements
Section titled “Requirements”- CS-Cart or CS-Cart Multi-Vendor 4.17.2 – 4.21.x.
- PHP 7.2.5 – 8.3 (as supported by your CS-Cart version).
- MySQL or MariaDB with InnoDB (standard on every CS-Cart host).
- Recommended for large stores and for e-mail digests: a cron job (see below).
Install
Section titled “Install”- Go to Add-ons > Manage add-ons, click the gear icon and choose Manual installation.
- Upload
kv_sales_reports_pro-1.0.0.zipand click Upload & install. - Enter your license key under Settings > License (or the Marketplace license number in Add-ons > Manage).
- Open Orders > Sales Reports Pro.
The first data build
Section titled “The first data build”On the first visit the add-on prepares its report data from all existing orders. A progress bar shows how far it is. Keep the page open; it continues in steps of a few seconds and reloads when it is done. With a cron job, the build also runs in the background. The build reads about 6,000–7,000 orders per second on a typical server, so 200,000 orders take less than a minute.
After the build, new and changed orders are added automatically: when an order is placed, edited or changes status, or when an RMA return changes. Changes made directly in the database are picked up by a safety check of the order modification time.
The original orders are never changed. You can rebuild the data at any time with gear icon > Rebuild report data.
Privileges
Section titled “Privileges”The add-on adds two privileges in the Orders group, next to the core sales reports:
| Privilege | Allows |
|---|---|
| View sales reports | All reports, CSV export, saved reports, “Update data now” |
| Manage sales reports | E-mail digests, adding a segment to a user group, rebuilding the report data |
Both are given to administrator user groups with full access on install. Restricted administrators need them added in Customers > User groups.
Cron job
Section titled “Cron job”Recommended. It keeps the report data current for stores with many orders and sends the e-mail digests. The exact command and URL are shown in the settings (Data collection > Cron job). Run it once an hour:
0 * * * * php /home/yourstore/public_html/admin.php --dispatch=kv_sales_reports_pro.cronOr call the URL https://yourstore.com/admin.php?dispatch=kv_sales_reports_pro.cron&cron_password=CRON_PASSWORD (the password is the one in Settings > Security settings).
Without a cron job, the data is updated whenever an administrator opens a report, and digests are sent when an administrator opens the reports and the cron job has not run for a day.
Upgrading
Section titled “Upgrading”Upload the new package the same way (or use the Upgrade Center). Settings, report data, saved reports and digests are kept.
Uninstalling
Section titled “Uninstalling”Uninstalling removes the report data, the view counts, saved reports, digests, the settings, the privileges, the e-mail template and the language variables. Your orders are not touched.