PS PrestaShop Intermediate

Saved Searches & New Product Alerts — Documentation

Install, configure and schedule the dfsavedsearch module: saved searches, new-product email alerts, cron and GDPR compliance.

Updated Module version 1.0.0

Overview

The Saved Searches & Alerts module (dfsavedsearch) lets your customers save a set of search criteria — keywords, category, manufacturer, price range, availability — and receive an automatic email as soon as a new matching product is published in your store.

Every saved search becomes a re-engagement channel: the customer comes back on their own the day you publish a product they care about. An anti-duplicate log ensures they are only alerted about products published after they saved their search, and never twice for the same product.

In short: search saved in one click from the results page, explicit opt-in email alert, daily or weekly digest sent by a self-hosted cron task, native GDPR compliance.

Installation

  1. In your back office, open Modules > Module Manager and click Upload a module.
  2. Select the dfsavedsearch.zip archive and confirm.
  3. On install, the module creates its two SQL tables, its admin tab and its default configuration. A 32-character cron token is generated automatically.
  4. The module is active immediately. No external dependency is required (no Composer, no framework).

The module is compatible with PrestaShop 8.0 to 9.x, single store or multistore, across the catalogue’s five languages (FR, EN, ES, DE, IT).

Configuration (back office)

Go to the module configuration page (Modules > Module Manager > dfsavedsearch > Configure). The available settings are:

  • Enable the module — enables or suspends the button display and alert sending.
  • Products per digest — maximum number of products listed in a single alert email (12 by default).
  • Searches per customer — maximum number of searches a customer can save (20 by default).
  • Default frequency — daily or weekly, applied to new searches.
  • Cron token — shown in plain text, with a regeneration button. The full cron URL and the last run date are recalled in a dedicated panel.

Values are stored in the configuration variables DFSAVEDSEARCH_ENABLED, DFSAVEDSEARCH_MAX_PRODUCTS, DFSAVEDSEARCH_MAX_PER_CUST, DFSAVEDSEARCH_DEFAULT_FREQ, DFSAVEDSEARCH_CRON_TOKEN and DFSAVEDSEARCH_LAST_CRON.

Customer-side usage

On the search results page, a « Save this search » button is injected automatically. Clicking it opens a window where the customer can:

  • name their search;
  • specify or adjust their criteria: keywords, category (sub-categories included), manufacturer, minimum and maximum price, in-stock products only;
  • optionally enable the email alert and choose its frequency.

The email alert relies on an explicit opt-in checkbox, unchecked by default, with clear consent wording. A logged-out visitor is prompted to sign in before saving a search.

The « My searches » area

A « My searches » entry is added to the customer account. There the customer finds all their saved searches and can, for each one:

  • enable or disable the email alert;
  • change the frequency (daily / weekly);
  • delete the search.

Each search’s criteria are summarised as readable badges (category, manufacturer, price range, etc.).

Scheduling the cron (sending alerts)

Email sending is driven by a token-secured cron task. Configure your server’s task scheduler (or a cron service) to call the following URL:

https://your-store.com/index.php?fc=module&module=dfsavedsearch&controller=cron&token=YOUR_TOKEN

Replace YOUR_TOKEN with the token shown in the module configuration.

Recommended frequency: call the URL every hour. The module then respects each search’s own frequency (daily or weekly): the last-sent date is only updated when an email is actually sent.

Processing is done in batches (200 searches per run) to stay light. The cron output reports the number of searches processed, emails sent and any errors, logged in the PrestaShop logs.

Keep your cron token confidential. If it leaks, regenerate it in one click from the configuration: the old URL then stops working.

GDPR compliance

  • Explicit opt-in: the email alert is never enabled without a deliberate customer action (checkbox unchecked by default).
  • One-click unsubscribe: every email contains a signed unsubscribe link that disables the alert without login.
  • Export and deletion: the module integrates with PrestaShop’s GDPR hooks (psgdpr) for personal data export and deletion.
  • Automatic purge: when a customer account is deleted, all their saved searches are removed.

Compatibility & technical conventions

  • PrestaShop 8.0 to 9.x, multistore, 5 languages.
  • Hooks used: displayCustomerAccount, actionFrontControllerSetMedia, displayFooter, actionObjectCustomerDeleteAfter, actionDeleteGDPRCustomer, actionExportGDPRData.
  • Admin tab AdminDfSavedSearch under the Customers menu.
  • No dependency: manual PSR-4 autoloader, vanilla JS, no external service.

Troubleshooting

  • No email is sent — check that the cron is actually called (last run date in the configuration), that the module is enabled and that PrestaShop’s email configuration works.
  • The button doesn’t appear — it only shows on the search results page; make sure the module is enabled and clear the PrestaShop cache.
  • A customer receives no alert — make sure the alert is enabled for that search and that new matching products were indeed published after it was saved.
Was this page helpful?

Still stuck? Contact support