DataFirefly Live Counters — Complete guide
Install, configure and update DataFirefly Live Counters 2.0 for PrestaShop 1.7.8 to 9: blocks, counter definitions, sourced and dated figures, social networks, scheduled task and troubleshooting.
DataFirefly Live Counters displays counter blocks on your PrestaShop shop: customers, orders shipped, countries delivered, reviews, units sold, blog posts, years in business or followers. Version 2.0 gives every figure a visible note that says where it comes from and on what date it was established, and hides those that cannot be shown honestly. This documentation covers installation, upgrading from 1.x, creating blocks, counter definitions, safeguards, social networks, the scheduled task and troubleshooting.

Installation
- Download
dflivecounters-2.0.0.zipfrom your DataFirefly account. - Back office → Modules → Module Manager → Upload a module, then send the zip file.
- The module creates its tables (prefix
dflc_), its placements and a Live counters tab in the Design menu. A sample block is created inactive: nothing is displayed on your front office until you activate it.
Compatible with PrestaShop 1.7.8 to 9.x and PHP 7.1 to 8.5. Tested on 29 November 2026 on 1.7.8.11 (Classic, PHP 7.4), 8.2.1 (Classic, PHP 8.1, multistore) and 9.1.5 (Hummingbird, PHP 8.5).
Upgrading from 1.x
Upload the 2.0.0 zip file over the installed version: PrestaShop runs the upgrade script.
- Carried over: one block per shop with the converted style, the colours, columns, animation duration, refresh and the placements actually hooked; titles and labels in all languages; prefixes, suffixes, decimals, icon colours; start date and “shipped” statuses; Facebook and Instagram tokens, now encrypted.
- Kept but hidden, with a notice in the back office: typed figures without a source or date (satisfaction, reviews, networks), CO₂ and the former offset, converted into an “earlier figure” that needs a source.
- The old configuration is backed up without the tokens, then the 1.x keys are deleted: no plain-text token remains in the database.
After the upgrade, open each block: the editor lists the hidden counters and the information to complete for each one.
Creating a block
Open Design → Live counters. The Blocks section shows each block, its placements and its status. Create an empty block or start from a template: home page, above the footer, product page or followers.

In the editor, choose:
- Placements: 15 hooks to choose from (home page, banner, header, top and bottom of content, before the footer, footer, columns, three product page placements, category, cart).
- Widget:
{widget name='dflivecounters' block=3}in a template of your theme. - Shortcode:
[dflivecounters block="3"]in a CMS page. - Title and subtitle in each language.

The live preview uses the real rendering, computed from the shop’s actual data, on desktop or mobile and in the language of your choice. It flags insufficient contrast between the text and the background.
Styles
- Style: cards, band or minimal.
- Background: light, tinted, dark or main colour.
- Columns for desktop and mobile, alignment, main colour and colour per counter.
- Icons: 30 icons included, or your own SVG, filtered by an allowlist (scripts,
on*attributes,foreignObject,url()and styles removed). - Notes: numbered under the block or in an accessible tooltip.

Colours are written to a stylesheet generated per shop: the module adds no inline style or script and remains compatible with a strict Content Security Policy. On mobile, the width of the figures is reserved to avoid any layout shift.

Counters and their definitions
In the editor, each counter shows its status (automatic, typed and dated, synchronised), its current value and the note visitors will see.

Shop counters
- Customers: active accounts, excluding guests, deleted accounts and test accounts. Option: include guests.
- Orders shipped: orders that reached one of the “shipped” statuses you choose and were not then cancelled, refunded or in error, counted from an optional start date.
- Countries delivered: distinct countries of the orders shipped.
- Products: products that are active and visible in the shop.
- Years in business: years elapsed since a date you specify.
- Validated orders: paid or accepted orders, excluding cancelled, refunded, payment error and test orders. This figure reveals your order volume: it is hidden when created and displayed in “more than” format by default. Turnover is never displayed.
Reviews, blog, product and category
- Average rating and share of 4 and 5 star reviews: computed from the published reviews of dfreviews or productcomments, for the current shop, rounded down, with the number of reviews in the note. Hidden below a minimum number of reviews.
- Published reviews: number of published reviews.
- Posts: published posts from dfblog, smartblog, ph_simpleblog or prestablog, detected automatically.
- Units sold (product page): quantities from the validated orders of the product being viewed, returns deducted. Default threshold: 50.
- Category sales (category page): the same calculation for the category being viewed.

Test accounts and definitions
Test accounts are identified by a list of address patterns (by default the reserved domains of RFC 2606, such as example.com) and by employee addresses. Shipped and excluded statuses are set in Definitions and safeguards, where the definitions are restated.

Typed figures: source, date and respondents
Some figures cannot be computed by the shop: satisfaction measured by a survey, reviews from an external platform, awards, TikTok, LinkedIn or X followers. They are typed with:
- the value;
- the date on which it was established (never in the future);
- the source, optionally with an http(s) link;
- for satisfaction, the number of respondents.
Visitors see, for example, “Source: post-purchase survey, 412 respondents, as of 30 September 2026”. As long as an item is missing, the counter stays hidden. An alert appears in the back office when the value exceeds the age you have set.

Earlier figure
The arbitrary offset of 1.x no longer exists. If your shop took over customers or orders from a previous site, add that earlier figure with its source and date: it is added to the calculation and the note says so, for example “Includes 3,840 before 31 December 2023 (previous site)”.
CO₂
The CO₂ counter is absent by default. To display it, you must enter the calculation method, the source, the date and the address of a public page that justifies the figure. It is displayed with the wording “Estimate. Method: …”. Generic claims (“eco-friendly”, “carbon neutral”, “climate neutral”, “100% offset”, “éco-responsable”… in 8 languages) are rejected in its label and flagged in the block titles.

These checks reduce the risk of a misleading claim but do not guarantee that it is lawful. Directive (EU) 2024/825 regulates generic environmental claims; have your figures and wording approved by your legal adviser.
Thresholds and hidden counters
A counter below its threshold is not displayed: 10 by default for shop counters, 50 for units sold. An automatic counter at 0 is always hidden. For every hidden counter, the editor gives the reason: missing value, date, source, respondents or method, threshold not reached, minimum number of reviews, synchronisation too old, no review module.

Number formats
- Separators of each language (CLDR): 12 480 in French, 12,480 in English, 12.480 in German; minimum grouping in Spanish, Polish and Portuguese (4800 rather than 4 800).
- Localised short format (“12.4K”) and “more than 12,000” steps.
- Prefix, suffix and decimals per counter.
- All rounding is downwards: 1,199 becomes “1.1K”, never “1.2K”.
The animation starts from 0 and stops exactly on the real value. It does not play if the visitor has asked for reduced motion, or if the block is already visible when the page loads.
Social networks

Facebook and Instagram
The follower count of a Facebook Page and of an Instagram professional account (Business or Creator) is synchronised by the scheduled task, at most every 6 hours, via the Graph API (v27.0 by default, configurable). There is no API call while pages are displayed.
- In your Meta app, generate a long-lived Page token (Facebook) or an Instagram token; standard access is enough for your own Page.
- In Social networks, paste the ID and the token, then save. The token is encrypted (AES-256-GCM) and is never shown or logged again.
- Optional: enter the app secret to sign the calls (
appsecret_proof).

- The Instagram token is renewed automatically before its 60 days expire.
- If an error occurs (expired token, quota, invalid response, timeout), the last good value is kept with its date, then hidden after the number of days you choose. The connection status and the last error are shown in the back office.
- Redirects are not followed and calls are cut off after 6 seconds.
TikTok, LinkedIn and X
Their APIs do not give simple access to follower counts for public display (per-user authorisation and app review at TikTok, verified organisation at LinkedIn, paid API at X). These counters are therefore typed manually, with the date of the reading, which is shown to visitors. No brand logo is bundled: use a neutral icon or your own SVG, following each network’s brand guidelines.
Scheduled task and log
The scheduled task recomputes the counters and synchronises the networks. Copy the URL shown in Schedule and log (it contains a secret token) into your server’s crontab, for example every hour, or let PrestaShop’s “Cron tasks manager” module call it.

- The token is compared in constant time; a request with no token or a wrong token receives a 403 response.
- A lock prevents two simultaneous runs.
- The log lists recomputations, synchronisations and errors; it can be filtered and is purged automatically.
- Without a scheduled task, values are recomputed at most once per cache lifetime (1 hour by default); social networks, however, are only synchronised by the scheduled task.
Refreshing without reloading
A block can refresh periodically via index.php?fc=module&module=dflivecounters&controller=refresh&block=N. This endpoint:
- only responds for active blocks with refresh enabled, and only with the counters that can be displayed;
- reads the cache, without recomputing;
- sets no cookie and is publicly cached for 60 seconds;
- is limited to 30 requests per visitor every 5 minutes (429 response with
Retry-After); - returns the same 404 response for a block that does not exist or is disabled.
Multistore
Blocks, values, social connections and log are specific to each shop. In the “all shops” context, the back office asks you to choose one. A block ID from another shop is treated as non-existent. The scheduled task processes all shops.
Permissions and security
- Any change requires the “edit” permission on the tab; a read-only employee can view the blocks but cannot save or see the scheduled task URL.
- Each form carries a CSRF token specific to the module and the employee.
- Input is normalised (allowlists, colours, dates, http(s) addresses, tags stripped) and SQL queries are typed.
- No personal data is displayed; the IP address is only stored hashed, for rate limiting.
Accessibility
- The real figure is written in the HTML: screen readers, visitors without JavaScript and search engines can read it.
- The animated copy is hidden from assistive technologies (
aria-hidden) and a full text is provided for them. - No
aria-liveregion: the refresh is not announced over and over. - The visitor’s “reduce motion” setting is respected.
- The pages tested showed no axe-core violations; check the contrast of your custom colours, which is flagged in the preview.
Uninstalling
Uninstalling deletes the dflc_ tables, the configuration keys, the tab and the generated stylesheets.
Troubleshooting
The block is not displayed. Check that it is active, hooked to a placement that exists in your theme, and that at least one of its counters can be displayed: the editor gives the reason for each hidden counter.
The number of orders shipped seems low. Check the selected “shipped” statuses and the start date. Cancelled, refunded and failed orders, and orders placed from a test account, are excluded.
The average rating does not appear. You need dfreviews or productcomments, published reviews and at least the minimum number of reviews you have set.
The Facebook or Instagram counter is hidden. Open Social networks: the last error and the date of the last synchronisation are shown there. An expired token must be replaced, and the scheduled task must be running.
The figures do not change. Values are cached (1 hour by default) and recomputed by the scheduled task. Run it, or save the block to force a recomputation.
My CO₂ label is rejected. It contains a generic claim (“carbon neutral”, “eco-friendly”…). Describe the measured fact instead, for example “kg of CO₂ avoided through grouped delivery (estimate)”.