Trending Products & Popular Searches Module — Complete guide
Installation, configuration and inner workings of the trends widget: popular searches, rising products and the Right now section.
Overview
DF Trending adds a trends widget to your PrestaShop 8 or 9 shop, made of three independent sections: the current popular searches (clickable tag cloud), rising products (sales-velocity detection) and an auto-generated Right now section blending product page views and recent sales. A dedicated back-office tab provides the analytical view of these three streams.
Installation
- In the back office, open Modules > Module Manager and click Upload a module.
- Select the
dftrending.ziparchive and confirm. - The module creates its data tables, its default configuration values and the Trending analytics tab, then hooks itself onto the home page automatically.
No Composer dependency, no external framework: the archive is self-contained and behaves identically from PrestaShop 8.0 to 9.x, on single shops and multistore setups.
Configuration
Open the module configuration from the Module Manager. Available settings:
- Show trending searches — enables or hides the tag cloud.
- Show rising products — enables or hides the velocity section.
- Show the right now section — enables or hides the views + sales blend.
- Number of searches to display — size of the tag cloud (default 8).
- Number of rising products and number of Right now products — size of both product grids (default 4).
- Analysis window (days) — length of the recent window compared to the previous window of the same length (default 7).
- Minimum sales to qualify — threshold below which a product is never considered rising (default 2).
- Cache lifetime (seconds) — how long trend computations are reused without querying (default 3600).
Every settings save automatically flushes the internal cache: new values are visible immediately on the storefront.
How it works
Popular searches
The module listens to the native PrestaShop search engine. Every query is normalized (lowercase, collapsed spaces, length between 2 and 64 characters) then aggregated per day, per language and per shop. The cloud displays the most frequent queries over the analysis window; each tag links to the matching results page.
Rising products
Quantities sold over the recent window are compared to those of the previous window of the same length. Only valid orders are counted. The ranking score weights growth by recent volume: a product going from 50 to 90 sales outranks one going from 2 to 4. Inactive or hidden products are excluded.
Right now section
Each visited product page sends a lightweight beacon from the browser, once per product per session. This client-side counting stays accurate behind a full page cache. The score blends views and recent sales (one sale weighs five times as much as one view); products already shown in the rising section are deduplicated automatically.
Widget placement
By default the widget renders on the home page (displayHome hook). The module implements the PrestaShop widget interface: from Design > Positions you can attach it to any display hook of your theme. Products are rendered with your theme’s native miniatures, inside a self-contained grid that does not depend on its styles.
Back-office dashboard
The Trending analytics tab (under Modules) shows three panels: the 30-day top searches with their hit counts, rising products with recent sales, previous sales and growth percentage, and the most viewed products over the analysis window. Each product links straight to its edit page.
Data and privacy
The module stores no personal data: no customer identifier, no IP address, no tracking cookie. Only anonymous daily counters (query + count, product + count) are stored, and all data older than 90 days is purged automatically.
Troubleshooting
- The widget shows nothing — this is expected on a shop without history: each section stays hidden until it has relevant data. Also check that the sections are enabled in the configuration.
- Products stack vertically — clear the PrestaShop cache and force-reload the stylesheets (Ctrl+F5) after a module update.
- Views are not counted — check that no blocker filters the module’s
front.jsfile and that thetrackfront controller responds (a JSON response is expected).
Changelog
- 1.0.2 (2026-07-12) — initial public release: popular searches, sales velocity, Right now section, dashboard, internal cache, automatic purge.