DataFirefly Price Alert — Documentation
Installation, configuration, alert modes, cron, conversion tracking and troubleshooting for the price drop alert module for PrestaShop 8 and 9.
Overview
DataFirefly Price Alert adds a price drop alert to your PrestaShop 8 or 9 store. Visitors subscribe from the product page (with or without a customer account), pick between two modes — any drop or target price — and receive an email as soon as the price goes down. Every order placed by a notified subscriber is automatically attributed as a conversion, with the recovered revenue visible in the admin dashboard.
Installation
- In the back office, go to Modules → Module Manager → Upload a module.
- Upload the
dfpricealert-x.x.x.zipfile. - Click Install. The module creates two tables (
df_pricealert_subscriberanddf_pricealert_event), registers its hooks and adds the Price Alerts tab under Catalog.
No Composer dependency is required: the module ships a standalone PSR-4 autoloader. PHP 8.0 minimum.
Configuration
Go to Modules → DataFirefly Price Alert → Configure. Available settings:
- Double opt-in (GDPR) — enabled by default. The subscriber receives a confirmation email and the alert only becomes active after their click. Strongly recommended for GDPR compliance.
- Default alert mode — the mode pre-selected on the form: any drop or target price. The customer can always switch.
- Form position —
displayProductActions(below the buy button) ordisplayProductAdditionalInfo(additional information area). - Minimum drop percentage — in any-drop mode, ignore drops smaller than N%. 0 = any drop triggers.
- Merchant alert threshold — receive an email when a product reaches N active subscribers. 0 disables.
- Merchant email — recipient of the above alert (default: shop email).
- Retention (days) — auto-purge of unsubscribed/notified subscribers older than N days. 180 by default, 0 disables.
How it works on the customer side
Subscribing
The form is always visible on the product page. The customer enters their email and picks:
- Any price drop — they will be notified on the first reduction below the price displayed at subscribe time (subject to the configured minimum threshold).
- When it reaches — they enter a target price, mandatorily below the current price. The alert only fires when the price reaches or drops below that level.
If the product has combinations, the selected combination is captured automatically — and updated if the customer switches combinations before submitting.
Confirmation (double opt-in)
With double opt-in active, the subscriber receives a confirmation email. The alert stays in pending status until the click, then moves to active. Without double opt-in, the alert is active immediately.
Notification
When an eligible drop is detected, the subscriber receives an email with the old price struck through, the new price, the percentage off, the savings, and a direct link to the product. Their status moves to notified — they won’t receive another email for the same subscription.
Drop detection: the three triggers
The module detects price drops through three complementary channels:
- Hook
actionObjectProductUpdateAfter— fires on every product save in the back office. Covers manual price edits with zero latency. - Hook
actionUpdateProductAttribute— fires on combination edits. Covers per-combination price changes. - CLI command
bin/scan-prices.php— to wire into cron. Essential for scheduled specific prices, which activate on a date without firing any hook.
Setting up the cron
*/30 * * * * php /path/to/your/shop/modules/dfpricealert/bin/scan-prices.php --shop=1 >> /var/log/dfpricealert.log 2>&1
The --shop parameter is optional (default shop otherwise). The command prints the number of alerts dispatched and the execution time.
Recommended setup: keep the hooks active (zero latency on manual edits) and add the cron every 30 minutes to cover scheduled promotions.
Conversion tracking
On the actionOrderStatusPostUpdate hook, the module walks every order line and looks for a subscriber in notified status matching the triple (customer email, product id, combination id). On match, the subscriber moves to purchased and the id_order is recorded.
The match accepts either the exact combination or a generic subscription (combination 0) — products without combinations and “main product” subscriptions are therefore attributed correctly. Tracking also works for guest checkout, since matching is done by email.
Admin dashboard
The Catalog → Price Alerts tab shows:
- 6 KPIs — active subscribers, notified, converted, conversion rate, average accepted drop, recovered revenue.
- Hot products — top 10 products by active subscriber count, with average subscription price. This is your priority candidate list for a targeted promotion.
- Subscriber list — filterable by status, email and product, paginated at 25 rows.
- Actions — scan all products immediately, purge old entries, export the full list as CSV.
Subscriber lifecycle
Each subscription goes through the following statuses:
pending— subscribed, awaiting confirmation (double opt-in).active— alert active, watched by scans.notified— drop email sent. Terminal status unless purchased.purchased— order detected after notification, conversion attributed.unsubscribed— unsubscribed via the link present in every email.
Every transition is logged in the df_pricealert_event table (full audit trail).
Emails
Three templates, each shipped in FR/EN/ES/DE in HTML + text format:
- confirm — double opt-in confirmation with activation button.
- alert — drop notification: old price struck through, new price highlighted, savings in euros and percent, button to the product.
- merchant — merchant notification when a product crosses the active-subscriber threshold.
The email goes out in the subscriber’s language (the page language at subscribe time), with automatic fallback to English if the language is not available. Templates are customizable in modules/dfpricealert/mails/<iso>/.
GDPR
- Email double opt-in before activation (enabled by default).
- 32-byte cryptographic tokens (
random_bytes) unique per subscriber for confirmation and unsubscribe. - One-click unsubscribe link in every email.
- Configurable auto-purge of old data (data minimization).
- No data sent to third-party services — everything stays on your server.
Troubleshooting
Alerts are not going out
- Check that the subscriber is in
activestatus (notpending— double opt-in requires confirmation). - Check the minimum drop threshold: a 3% drop with a 5% threshold does not trigger.
- In target-price mode, the price must reach or fall below the target — not merely drop.
- For scheduled specific prices, verify the cron is running (check the log).
- Test PrestaShop email delivery in general (Advanced Parameters → E-mail → Test).
Errors during subscription
The module logs all errors in Advanced Parameters → Logs with the [dfpricealert] prefix. The form additionally displays detailed server errors directly below the button (HTTP status and response excerpt), which speeds up diagnosis.
The form does not appear
- Check the configured position: some themes do not implement
displayProductAdditionalInfo— switch todisplayProductActions. - Clear the PrestaShop cache (Advanced Parameters → Performance).
Uninstalling
Uninstalling removes the module’s two tables (subscribers and events included), the hooks, the admin tab and all configuration keys. Export the CSV beforehand if you want to keep the history.