What it does
- An admin page: find a product, choose a change and a date and time. Five changes: set the price; a sale price for a period; turn the product on or off; add the product to a category; take it out of a category.
- The shop applies a change when it is due. With no setup, the first visit to the shop (or to the module page) after the time applies it. For to the minute timing, call the cron address shown on the page (it contains a secret key) every minute from a cron job.
- Several changes due together are applied in the order of their time. A change for a product or category that no longer exists is marked failed with the reason.
- Agenda: waiting changes grouped by day, each with a Cancel button. Log: every applied, failed, cancelled and undone change with its time.
- Undo for any applied change: the old price or on/off state is put back, a category move is reversed, a sale row made by the module is removed. A change that did nothing (the product was already in the category) is not reversed.
- A sale made by the module is an ordinary shop sale (for the shop's default customer group, priority 1): it lasts through the end day you choose, or has no end. On OpenCart 4.1 it is stored in the discount table as the shop's own sales are.
- Times are in the shop time zone. At most 500 waiting changes. The table stays when the module is uninstalled, so the log is kept; a reinstall makes a new cron key. Status switch.
What it does not do
- Undo of a price puts back the price the product had when the change was applied, even if it was edited by hand since.
- The sale is for the default customer group only, and one price per product and change.
- It changes the product's price, status and categories only: not names, descriptions, stock or other fields.
- It does not touch other sales or discounts of the product.
Tested
Installed and used through the real admin installer on OpenCart 2.3.0.2, 3.0.5.1, 4.0.2.3 and 4.1.0.4 (70 to 75 checks each, 0 failures): all five changes with real requests, applying on a shop visit, in time order, from the admin page and from the cron address (right key, wrong key, no key), cancel, undo (once only), failed changes, status off, refusing bad input and visitors without an admin session, uninstall and reinstall. A scheduled sale was seen on the product page of 3.0 and 4.1, and the admin page was used in a real browser on 3.0 (search, schedule, agenda).
Note
Screenshots are not included yet.