PS PrestaShop Intermediate

Multi-Step Abandoned Cart Recovery: complete guide

Install, configure and run abandoned cart recovery: on-brand multi-step email sequences, escalating vouchers, one-click cart restore, targeting and per-step statistics for PrestaShop 8 and 9.

Updated Module version 1.3.11

Overview

The Multi-Step Abandoned Cart Recovery module (datafireflycartrecovery) detects abandoned carts and follows up with your customers through a sequence of scheduled emails. Each step has its own delay, content per language and an optional voucher whose incentive can grow from one step to the next. A signed link lets the customer get their cart back in one click, with the voucher already applied, and the dashboard measures the revenue actually recovered, step by step.

On average, nearly 7 out of 10 carts are abandoned before payment. A well-tuned sequence (a simple reminder, then a moderate discount, then a stronger offer with free shipping) recovers part of that revenue with no manual work.

Compatibility

  • PrestaShop 8.0 to 9.x
  • PHP 8.1 to 8.3
  • Single store and multistore (campaigns, carts and statistics kept separate per store)
  • Interface: FR, EN, ES, DE, IT, PL
  • Email templates and default campaign: FR, EN, ES, DE, IT, PL, NL, PT. Any other installed language automatically gets an editable copy of the template in the store’s default language (English as a fallback).
  • Compatible with the official GDPR module psgdpr
  • PSR-4 architecture without Composer, no external dependency

Installation

  1. In the back office, open Modules > Module Manager.
  2. Click Upload a module and select datafireflycartrecovery.zip.
  3. Click Configure to set the general settings and the email appearance.
  4. Set up the scheduled task (next section), then send yourself a test email from a step.

Installation creates the module tables, registers its hooks, adds the Cart recovery tab and a default three-step campaign: +1 h (simple reminder), +24 h (-5% voucher) and +72 h (-10% voucher and free shipping).

Updating from a previous version

Upload the new ZIP: the upgrade scripts run automatically.

  • To 1.3.11: full module audit. In multistore, each store now only processes its own sends (the cron of one store also sent those of the other stores, with its links and logo). A customer who came back and then left again no longer receives the same step twice. After a cron outage, only the most advanced step goes out. Guest vouchers are no longer offered to other visitors in the cart. The unsubscribe link shows a confirmation page (link scanners in corporate mail systems no longer unsubscribe customers). Employee permissions are checked on every back-office action. The script adds three columns, keeps a single active campaign per store (the one the scan already used), fixes a sender name saved with a backslash and resets the amount of emptied carts to 0. Links in emails sent before the update still restore the cart, without automatic login.
  • To 1.3.10: a cart emptied by the customer stops its sequence (scheduled emails cancelled, reason “Cart emptied by the customer”) and shows 0 items and an amount of 0. No database change.
  • To 1.3.9: step delays are shown in the employee’s language and without decimals (“1 h 30 min”, “1 d 12 h”). They always used the French abbreviation “j” before. No database change.
  • To 1.3.8: fixes the panel header buttons on PrestaShop 8 (Settings, Disable, Delete, Add a step), which overlapped in the same spot. No database change.
  • To 1.3.7: a cart deleted in PrestaShop no longer receives reminder emails. The script registers a new hook. Emails scheduled for carts that were already deleted are cancelled on the first cron run. No database change.
  • To 1.3.6: the email preview shows the template overridden in the theme (see Customizing the email template). No database change.
  • To 1.3.5: the reminder voucher can no longer be combined with another promo code. The script registers two new hooks. No database change.
  • To 1.3.4: fixes a blank page “If no employee is assigned in the context, cart ID must be provided to this method” when a cart is saved outside a browsing session (webservice, connector, payment webhook, script), the “Send now” button outside the sending window, and shifted due dates when the MySQL server does not use the store time zone. No database change.
  • To 1.3.1: fixes the 500 error on the cron URL on PrestaShop 8. No database change.
  • To 1.3.0: adds targeting by groups and categories and the appearance settings. Emails switch to a white header with the store logo, and the original blue stays the accent color. Adjust in Email appearance if needed.
  • To 1.2.0: registers the new hooks (GDPR, email headers, language added) and creates missing email templates for installed languages.

If your store was on 1.1.0, the update requalifies carts wrongly counted as recovered (orders placed without any reminder email). The displayed recovered revenue goes down: that is the correct figure. Test the update on a staging store before production.

Scheduled task (cron)

The module works through regular runs triggered by a token-secured URL. On each run:

  1. Scan: carts inactive for longer than the abandonment delay are qualified (targeting, cooldown) and their steps scheduled.
  2. Sending: due emails go out, respecting every safeguard.
  3. Cleanup: module vouchers expired for 7 days and never used are deleted.

The exact URL, with its token, is shown on the dashboard (Set up button, with one-click copy) and in the module configuration:

https://YOUR-STORE/index.php?fc=module&module=datafireflycartrecovery&controller=cron&token=THE_TOKEN

Schedule a call roughly every 10 minutes:

*/10 * * * * curl -s "https://YOUR-STORE/index.php?fc=module&module=datafireflycartrecovery&controller=cron&token=THE_TOKEN" >/dev/null 2>&1

A lock guarantees that only one run happens at a time: two simultaneous calls never send the same email twice.

Processing status

The top of the dashboard shows the status of the scheduled task: green if the last automatic run (cron or run without server cron) was less than 30 minutes ago, orange up to 3 hours, red beyond that or if it never ran. The Run now button runs immediately and shows the result: carts detected, emails sent, emails postponed outside the sending window, failures. It does not turn the indicator green: only an automatic run proves that the cron works.

Without access to cron tasks

Enable Run without server cron in the module configuration. Processing is then triggered by store visits, at most every 10 minutes, after the page has been sent to the visitor: browsing is not slowed down. This option requires PHP-FPM or LiteSpeed. On a mod_php server, it stays inactive and a warning is shown when saving: create a real cron task instead.

This option depends on traffic: a store with no visits at night will send nothing until the first visit in the morning. A real cron remains more reliable. Do not share the cron URL token.

General settings

  • Abandonment delay (60 min by default): inactivity after which a cart is considered abandoned.
  • Emails per run (50 by default): number of emails processed on each run.
  • Max emails per cart (3 by default): limit across all steps, 0 for no limit.
  • Max lifetime (30 days by default): beyond this, an unconverted cart becomes Lost.
  • Auto-login via the link (enabled by default): logs back in the registered customer who clicks the restore link, for 7 days after the email is sent, provided the account email is still the address the reminder was sent to.
  • Sender email and name: when empty, the store’s are used. The name cannot contain the characters < > ; = # { }, which PrestaShop rejects when sending.
  • Run without server cron: see the previous section.

Email appearance

In the module configuration, the Email appearance block aligns reminders with your visual identity:

  • Store logo: uses the email logo set in Design > Theme & Logo, otherwise the main logo. Its dimensions are calculated to display correctly in Outlook. Without a logo, the store name is shown.
  • Accent color: button, links, line under the header and voucher block.
  • Header background: white recommended if your logo is dark.

Text placed on these colors automatically switches to white or dark depending on contrast: a yellow button gets dark text, a navy button white text. The result is visible in the preview of each step.

Customizing the email template

The text of each step (subject, body, button) is set in the back office. To change the layout itself (structure, fonts, footer), copy the module template into your theme. PrestaShop then uses it instead of the module’s, for sending as well as in the preview and the test email.

themes/YOUR-THEME/modules/datafireflycartrecovery/mails/en/df_cart_recovery.html
themes/YOUR-THEME/modules/datafireflycartrecovery/mails/en/df_cart_recovery.txt

For each language, PrestaShop looks in the active theme, then the parent theme, then the module. It tries the customer’s language, then the store’s default language, then English.

Copy both files, .html and .txt. With the email type set to “both” (PrestaShop’s default), a theme folder that contains only the .html makes PrestaShop move on to the next language: the customer then receives the module’s English template.

Keep the variables replaced at sending time:

  • HTML: {body_html}, {cart_table}, {voucher_block}, {restore_url}, {unsubscribe_url}, {cta_label}, {shop_name}, {tracking_pixel}, {header_brand}, {header_bg}, {header_text}, {accent_color}, {accent_text}.
  • Text: {body_text}, {cart_text}, {voucher_text}, {restore_url}, {unsubscribe_url}, {shop_name}.

Without {tracking_pixel}, opens are no longer counted. Without {unsubscribe_url}, the unsubscribe link disappears, which is a compliance issue. After a module update, compare your copy with the module template to pick up any new variable.

Campaigns and targeting

A campaign groups a sequence of steps and its rules. The campaign screen shows its settings and, below them, the list of its steps.

Only one active campaign per store. Activating a campaign disables the others, and their running sequences move to the new one: they resume at the step after the last email sent. A new campaign is created disabled, and a campaign without an active step cannot be activated. In multistore, create a campaign in each store.

  • Minimum cart amount: 0 for no minimum.
  • Sending window: time range outside which due emails are postponed. It can span midnight (22 to 6). Same start and end: sending at any time.
  • Cooldown (in days): a recipient who received a reminder for another cart during this period, or who already has another cart in a sequence, is not reminded. The rule is checked again right before each send.
  • Target guests: includes guest customers or not.
  • Exclude B2B accounts: excludes customers with a company, SIRET or VAT number filled in.
  • Excluded customer groups: no email for customers belonging to one of these groups (resellers, staff).
  • Excluded categories: a cart containing at least one product from these categories is not reminded (gift cards, low-margin products, prescription products). A search field filters the tree.

Sequence steps

  • Position: order of the step, unique within the campaign.
  • Delay after abandonment (in minutes): 60 = 1 h, 1440 = 24 h, 4320 = 72 h. It must increase with the position: each step goes out after the previous one.
  • Subject, button text and body per language: the body is written in a visual editor. When empty, the button text uses a translated default label. The subject cannot contain the characters < and >, which PrestaShop rejects when sending.
  • Active step: suspends a step without deleting it.

Variables

Usable in the subject, button text and body. Clicking a variable copies it.

  • {firstname}, {lastname}: customer’s first and last name.
  • {shop_name}: store name.
  • {cart_total}: cart total in its currency.
  • {voucher_code}, {voucher_value}, {voucher_expiry}: voucher code, value (for example 10% or €5.00) and expiry date. Empty if the step does not generate a voucher.

The body is inserted into a responsive template that adds the header, the cart summary (photos, combinations, total), the voucher block, the button and the footer with the unsubscribe link. A clean plain-text version is generated for mail clients that do not display HTML.

Preview and test email

Once the step is saved:

  • The Preview button in each language tab (or the eye icon in the step list) opens the final rendering, with a desktop / mobile toggle.
  • The Send a test email block sends the step to the address and in the language of your choice. The subject is prefixed with [TEST].

Preview and test use the saved version of the step and the most recent real cart of the store, with the dummy code DFCR-TEST42. No voucher is created, no statistic is changed, and the button link leads to the cart page without restoring a customer’s cart.

Vouchers

Each step can generate a voucher at sending time:

  • Type: percentage or fixed amount (tax incl. or excl.).
  • Value (percentage between 0 and 100) and minimum amount.
  • Validity in days.
  • Free shipping, alone or combined with the discount.
  • The voucher is single use and time limited. It is tied to the customer for registered accounts. For guests it is not tied to the account, because PrestaShop creates a new guest account for each order: the code stays secret, usable only once and is never offered to other visitors in the cart.
  • No stacking with another promo code: if the customer enters another code while a reminder voucher is in the cart, or the other way round, the code is refused with the message “This promo code cannot be combined with another promo code.” and the code already in the cart is kept. Automatic cart rules without a code (free shipping over X, for example) can still be combined.
  • Escalation without stacking: when a new step generates a voucher, the previous unused voucher of the same cart is disabled. Only one reminder voucher at a time in the cart: entering a valid DFCR- code replaces the one already there, and a wrong or expired code does not remove the applied voucher.
  • Cleanup: vouchers expired for 7 days and never used are deleted automatically.

Good practice: no discount at the first step, then a gradual escalation (-5%, then -10% with free shipping). The dashboard shows the revenue attributed to each step: you can see whether the strongest discount earns more than it costs.

One-click cart restore

Each email contains a signed link (HMAC). On click:

  • the cart is rebuilt and the customer lands on their cart page;
  • the voucher of the clicked email is applied automatically (any previous reminder voucher is removed), unless the cart already contains another promo code, in which case the customer’s code is kept;
  • the registered customer is logged back in if the option is enabled and the email is less than 7 days old; the address chosen in the cart is kept;
  • the click is recorded.

In multistore, links point to the cart’s store, in the customer’s language, and a cart is only restored in its own store.

Any change to the link parameters invalidates it. A cart that has already been ordered redirects to the home page. If another customer is logged in on the browser, their session and cart are left untouched and the cart from the email is not restored.

How a sequence runs

  • Resume: if the customer comes back to edit their cart, pending reminders are cancelled (reason “Customer came back to the cart”). If they leave again, the sequence is rescheduled from the next step, without resending a step already received.
  • Catch-up: after a cron outage, if several steps of the same cart are due at the same time, only the most advanced one goes out. The others are skipped with the reason “Replaced by the next step, already due”.
  • Emptied cart: if the customer removes all items from their cart, the sequence stops and the cart shows 0 items and an amount of 0.
  • Old carts: a cart inactive for more than 7 days is never reminded. After a long cron outage, the first run therefore does not email customers who left weeks ago. If the customer comes back to the cart, it becomes eligible again.
  • Unavailable products: if no product in the cart can be ordered anymore (out of stock with backorders disabled, product disabled), the step is skipped. Later steps stay scheduled in case of restock.
  • Sending failure: on an SMTP error, the email is retried 15 then 30 minutes later. After 3 failures it is marked as failed with the error message, and the voucher created is deleted.
  • Deleted cart: if the cart is deleted in PrestaShop (Orders > Shopping Carts, cleanup script, third-party module), its scheduled emails are cancelled, immediately or on the next cron run, and a last check runs right before each send.
  • Order: when an order is validated, the remaining reminders are cancelled. An order created outside the checkout (import, ERP) is detected right before the next send and attributed the same way.

Tracking and attribution

  • Opens: invisible pixel in each email.
  • Clicks: click on the button or the restore link.
  • Recovery: a cart counts as Recovered only if at least one reminder email was sent before the order. An order placed before any email gets the Ordered without reminder status and is not included in recovered revenue.
  • Per-step attribution: each recovered cart is credited to the last email sent before the purchase.
  • Split order: when PrestaShop creates several orders for the same cart (different carriers), the recovered revenue is the total of all these orders.

Dashboard

  • Period: 7, 30 or 90 days.
  • Indicators: carts detected and abandoned value, recovered carts and recovery rate, emails sent, open and click rates, emails waiting to be sent, recovered revenue. Amounts are converted into the store’s default currency. The abandoned value is the cart value at the time of abandonment.
  • Chart of detections and recoveries per day.
  • Per-step performance of the active campaign: sent, opened, clicked, click rate, recovered carts and attributed revenue.

Tracked carts

The Carts tab lists tracked carts with a status filter, search (email, name or cart ID, #123 for a specific cart), pagination and CSV export of the filtered results. Each row shows the customer, amount, status, number of emails sent and scheduled, a link to the cart and, when relevant, to the order in the back office. The exclusion icon stops all reminders for a cart.

Status Meaning
Active Cart in progress, not abandoned yet
Reminder in progress Sequence scheduled or being sent
Recovered Order placed after at least one reminder email
Ordered without reminder Order placed before any email, not attributed
Lost Sequence finished or tracking period exceeded
Excluded Filtered by the campaign (amount, guest, B2B, group, category, cooldown): re-evaluated if the customer changes the cart. Excluded manually or cart deleted in PrestaShop: permanent
Unsubscribed The customer no longer wants reminders

Send log

The Send log tab details every email: scheduled and sent dates, recipient, step, status (scheduled, sent, skipped, cancelled, failed), open, click, voucher code and reason (customer came back to the cart, cart emptied by the customer, limit reached, products unavailable, cooldown, step replaced by the next one, SMTP error, cart deleted in PrestaShop…). For a scheduled email, you can send it now or cancel it. “Send now” sends the email immediately, even outside the sending window, and shows the result or the reason it was not sent.

GDPR and deliverability

  • Each email contains an unsubscribe link. It opens a confirmation page: unsubscribing is done with the button, so that link scanners in corporate mail systems do not unsubscribe customers without their knowledge. The address joins a persistent suppression list and pending sends for all its carts are cancelled.
  • The List-Unsubscribe and List-Unsubscribe-Post headers enable one-click unsubscribe from Gmail, Yahoo and other mail providers that require it for marketing emails.
  • Only carts linked to an email address (customer, or guest who completed the personal information step) are tracked: no address is captured before the customer submits it.
  • With the official psgdpr module, the module appears in the list of modules processing data: exporting and deleting a customer’s data covers their tracked carts and reminder emails. The export also shows whether the address is on the suppression list.
  • Deleting a customer account erases their tracked carts, send queue and events. Any opt-out stays on the suppression list.
  • Uninstalling deletes the tables, configuration and admin tab.

FAQ and troubleshooting

No reminder is sent

Check the processing status at the top of the dashboard. If it is red, the cron task is not calling the URL (or not with the right token): use Run now to check, then fix the task or enable running without a server cron. Then check that the campaign and at least one step are active, that the current time is within the sending window, and look at the Send log: the reason for every skipped or failed email is listed there.

The customer cannot add their promo code

This is intended: the reminder voucher cannot be combined with any other promo code. The customer must first remove the code in the cart, then enter the other one. Automatic cart rules without a code are not affected.

A deleted cart still receives emails

Up to version 1.3.6, an email already scheduled was sent even if the cart had been deleted in PrestaShop. Update to 1.3.7 or later: emails for these carts are cancelled, and the send log shows the reason “Cart deleted in PrestaShop”.

A customer received the same reminder twice

Up to version 1.3.10, two cases could produce a duplicate: a customer who came back to the cart and then left again, and two stores of the same multistore installation processing the same queue. Update to 1.3.11 or later.

Blank page “If no employee is assigned in the context, cart ID must be provided to this method”

This PrestaShop core message could appear with versions 1.0.0 to 1.3.1 when a cart was saved outside a browsing session (webservice, connector, payment webhook, script). Update to 1.3.4 or later.

The cron URL returns a 500 error

On PrestaShop 8, versions 1.0.0 to 1.3.0 caused a 500 error on the cron URL. Update to 1.3.1 or later and check the version shown in the Module Manager. If the error persists, enable PrestaShop debug mode or check the server PHP logs to read the exact message.

A cart does not appear in the list

A cart is only tracked when it is linked to an email address: logged-in customer, or guest who completed the personal information step. It becomes abandoned after the abandonment delay (60 minutes by default) and on the next cron run.

My logo does not appear or is unreadable

Check that the Store logo option is enabled and that a logo is set in Design > Theme & Logo. If your logo is dark, choose a light header background. Some mail clients block images by default: the store name is then shown instead.

The test email does not arrive

Check that the step has a subject in the chosen language and that the store can send emails (Advanced Parameters > E-mail, PrestaShop test email button). Also check your spam folder.

Can a customer receive too many emails?

No: the emails-per-cart limit, the per-recipient cooldown and the sending window control the frequency. An order or an unsubscribe cancels the remaining reminders.

Is the module multistore compatible?

Yes. Campaigns, tracked carts, appearance settings and statistics are kept separate per store.

Is it compatible with PrestaShop 9?

Yes. The module is compatible with PrestaShop 8 and 9 and follows the PS9 API changes (price formatting via the Locale API, controllers, email sending).

Was this page helpful?

Still stuck? Contact support