PS PrestaShop Beginner

Flash Sale & Countdown — Complete Guide

Install, configure and run flash sales: automatic discount scheduling via specific prices, server-synced countdown, sticky banner, targeting and evergreen mode for PrestaShop 8 and 9.

Updated Module version 1.0.0

Overview and requirements

Flash Sale turns your promotions into genuine time-limited flash sales. You schedule a campaign over a date window; the module applies the discount automatically through PrestaShop native specific prices and shows a countdown synced to server time. The promotional price therefore applies everywhere — product page, listings, cart and emails — with no change to your theme.

  • Compatible with PrestaShop 8.0 to 9.x, Classic theme and derived themes.
  • PHP 7.4 to 8.3.
  • Multistore and multilingual (FR/EN/ES/DE/IT).
  • No CRON task required: the discount is switched on and off by the specific price dates.
  • PrestaShop-compliant architecture (ModuleAdminController, ObjectModel), PSR-4 autoloader with no Composer dependency.

The discount is pushed into a specific price whose from / to window matches the campaign dates. PrestaShop activates and removes it on its own, to the second.

Installation

Install the module like any PrestaShop module:

  1. Download the dfflashsale.zip archive from your customer account.
  2. In the back office, go to Modules > Module Manager.
  3. Click Upload a module and drop the archive.
  4. Once installed, manage your campaigns from Catalog > Flash Sales.

On installation the module creates its tables (campaigns, targeting, specific-price mapping), registers its display hooks and adds the Flash Sales tab under Catalog.

Global module settings

The configuration page (Configure from the Module Manager) gathers the global settings shared by all campaigns:

  • Sync the countdown to the server: aligns the clock to server time (recommended). See the dedicated section.
  • Offset page content (push body): automatically adds a margin so the sticky banner never overlaps content.
  • Show the banner on mobile: shows or hides the banner on small screens.
  • Banner z-index: the banner stacking level, to raise if a theme element appears on top of it.

Creating a flash-sale campaign

From the Catalog > Flash Sales tab, click Add a campaign. The form is organised into panels.

General

  • Name: internal identifier of the campaign (free text).
  • Active: enables or suspends the campaign.
  • Start / end date: the activity window. The discount and the countdown rely on these dates.
  • Priority: if several campaigns target the same product, the one with the highest priority wins for display.
  • Shops: in multistore, select the relevant shops.

Discount

  • Discount type: Percentage (e.g. -30%) or Fixed amount (e.g. -€15).
  • Value: the percentage or amount of the discount.
  • Currency: for a fixed-amount discount, the reference currency.
  • Tax: indicates whether the fixed amount is tax included or excluded.

The discount is applied through specific prices: it combines with PrestaShop native price rules according to their priority, and shows from the cart onwards.

Targeting

Choose the scope of the campaign:

  • Whole catalog: the discount applies to every product.
  • Categories: select one or more categories. The Include subcategories option extends the discount to the whole tree.
  • Products: search and select specific products (by name, reference or ID).

Display

  • Countdown banner: shows the global promo bar.
  • Banner position: top or bottom of the page.
  • Sticky banner: keeps the banner visible while scrolling.
  • Show on product pages: adds a countdown card under the price.
  • Show on home: adds a promotional block on the home page.
  • Teaser before start: shows a “starts in…” countdown before the start date.
  • When the countdown ends: hide the element or show an end message.

Appearance and copy

The Appearance panel sets the background colour, the text colour and the accent colour, plus the call-to-action (CTA) button link. The Copy panel gathers the translatable labels: banner title and subtitle, button text and end message, editable for every shop language.

How scheduling works

When you save a campaign, the module creates the specific prices matching the targeting: a global specific price (product 0) for “whole catalog”, or one specific price per product for category and product targeting. Each specific price’s validity window is aligned to the campaign start and end dates.

PrestaShop therefore turns the discount on and off by itself, to the second, with no scheduled task. The IDs of the created specific prices are stored in a mapping table so they are removed cleanly when the campaign is edited, deleted or the module is uninstalled.

For category targeting with subcategories, the product list is resolved at save time by walking the tree (nleft / nright). Remember to re-save the campaign if you reorganise your categories.

The server-synced countdown

The countdown is aligned to server time, not the visitor’s. At render, the module passes the server timestamp and the end date; the script computes an offset between server time and local time, then counts down locally from that offset.

As a result, a visitor who moves their computer clock forward or back does not skew the timer. No repeated network call is needed, and the countdown stays smooth and accurate for everyone.

You can disable server sync in the global settings; the countdown then relies on the browser’s local time.

Evergreen mode

Evergreen mode turns the campaign into an individual perpetual timer: each visitor gets their own deadline, triggered on their first visit and based on a duration in minutes that you define. The deadline is kept locally (localStorage) so it stays consistent across pages and visits.

In evergreen mode the countdown is unique to each visitor and does not match the real discount window. Use it for personalised urgency messages rather than to signal a shared promotion end.

Multilingual and multistore

All labels (title, subtitle, button, end message) are translatable per language. In multistore, each campaign can be restricted to specific shops, and specific prices are created per shop. A single campaign can therefore target one shop without affecting the others.

FAQ and troubleshooting

The discount does not apply

Check that the campaign is active, that today’s date is within the start and end dates, and that it concerns the current shop. For category targeting, make sure you re-saved the campaign after any reorganisation of the tree.

The banner overlaps my menu or content

Enable the Offset page content (push body) option in the global settings. If a theme element appears above the banner, raise the z-index value.

The countdown shows an inconsistent time

Make sure your server time is correct and that server sync is enabled. The timer aligns to server time, regardless of the visitor’s clock.

Several campaigns target the same product

Display keeps the campaign with the highest priority. For the discount, PrestaShop’s specific-price priority logic applies.

What happens on uninstall?

Uninstalling removes every specific price created by the module via its mapping table, deletes its hooks and tab, and cleans up its tables. Your original prices are fully restored.

Was this page helpful?

Still stuck? Contact support