1. What this module does
The module shows customers how much time is left to buy at the sale price: "Sale ends in 2 d 05:14:33". The countdown appears under the price of a discounted product on the product page and, if you wish, on product lists. The end date comes from the promotion you have already set in PrestaShop, so there is nothing to enter on the products.
Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.
2. Installation
- Download the module from My account → Order history at addonspresta.com.
- In your Back Office, open Modules → Module Manager and click Upload a module.
- Drop the
ap_promocountdown_v1.0.0.zipfile and wait for the confirmation. - Click Configure on the module card.
Right after installation the countdown is on for product pages and appears during the last 7 days of each sale.
3. How it works
A product gets a countdown when PrestaShop shows it at a reduced price (with the old price crossed out) and that reduction has an end date. Reductions come from two places in PrestaShop:
- a specific price of the product: Catalog → Products, the product's Pricing tab, a specific price with a reduction and an end date ("to");
- a catalog price rule: Catalog → Discounts → Catalog price rules, a rule with a reduction and an end date.
The module reads the end date of the reduction that PrestaShop applies to the visitor at that moment — for their customer group, country, currency and for the chosen combination. The countdown therefore always belongs to the price on the screen: a reduction for registered customers only shows a countdown to them, and when the customer picks another combination, the countdown follows its price.
No countdown is shown for a sale without an end date, for a fixed price without a reduction (the theme shows no old price then), for a quantity discount that starts at 2 units or more, for cart rules and vouchers, or when prices are hidden (catalog mode without prices, a customer group that does not see prices).
The end date is read in the shop time zone (International → Localization). In the page, the visitor's browser counts the seconds down to that moment; at the end the countdown disappears without reloading the page. If you chose to show it only during the last days, the browser also reveals it when that period begins, even on a page or block that PrestaShop serves from its cache.
The module does not create or change promotions or prices, does not change PrestaShop tables and does not connect to addonspresta.com or any other server.
4. Features and settings
Open Modules → Module Manager → Sale Countdown → Configure. The Help box at the top links to this manual and to the module page at addonspresta.com, in the language of your Back Office.
Display
- Show on the product page — the countdown under the price on the product page and in the quick view (on by default).
- Show on product lists — the countdown under the price in categories, search results, home page blocks and other product lists (off by default). It never appears in the cart, at checkout or in orders.
- Show during the last … days — the countdown appears this many days before the end of the sale, for example 7. Enter 0 to show it during the whole sale. Allowed values: 0 to 365.
Texts and colours
- Message on the product page — for example "Sale ends in {time}".
{time}becomes the time left in bold: "2 d 05:14:33", or "05:14:33" during the last day. - Message on product lists — a shorter text for the miniatures, for example "Ends in {time}".
- Text colour — a hex colour such as
#d0021b. Leave it empty to use the colour of your theme. - Background colour — a hex colour such as
#fff4e5. Leave it empty for no background; with a background the countdown gets a small padding and rounded corners.
Both messages can be written for each language of the shop and must contain {time}. The text in the default
language is required; other languages fall back to it when left empty. HTML tags are removed from the messages.
The page warns you when the countdown is turned off on the product page and on product lists at the same time.
5. Multistore
Settings are saved for the shop or shop group selected in the Back Office header. Select All shops to use the same settings everywhere, or a single shop to give it its own messages, colours and number of days. The promotions themselves are the ones of each shop, as set in PrestaShop. One licence covers every shop of the installation.
6. Uninstall
Module Manager → Sale Countdown → Uninstall removes the module's settings and messages. Your promotions are not touched. To keep the settings, use Disable instead.
7. FAQ and troubleshooting
A product on sale has no countdown. Check that its reduction has an end date, that the old price is shown on the product page, that the end is within the number of days you set (or set 0), and that the reduction is not a quantity discount. Then clear the cache in Advanced Parameters → Performance.
The countdown shows a different time than I expected. The end date is read in the shop time zone from International → Localization. Check the time zone and the end date of the specific price or catalog price rule.
A new sale does not show a countdown on the home page. The home page product blocks are kept in PrestaShop's cache. Clear the cache in Advanced Parameters → Performance; the module itself keeps already displayed countdowns up to date.
Can I change "2 d"? Yes, the day unit can be reworded in International → Translations → Installed module translations.
Can I change how the countdown looks?
Yes. Use the colour settings, add CSS for the .ap-promocountdown classes to your theme, or copy
views/templates/hook/countdown.tpl to themes/<your-theme>/modules/ap_promocountdown/views/templates/hook/ and
edit the copy.
8. Updates and support
Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings are kept.
Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.