1. What this module does
Win back abandoned carts with up to three reminder e-mails and an optional discount code. The module finds carts that hold products, belong to a customer with an e-mail address and were left without an order, and sends that customer up to three reminders at the times you choose. Each e-mail lists the products of the cart, has a button that puts them back into the cart in one click and an unsubscribe link, and — from the reminder you choose — a personal discount code. The configuration page shows what was sent and which orders came back.
Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.
2. Installation
- Download the module from My account → Order history at addonspresta.com.
- In your Back Office, open Modules → Module Manager and click Upload a module.
- Drop the
ap_cartreminder_v1.0.0.zipfile and wait for the confirmation. - Click Configure on the module card.
If you have shell access, you can also unpack the zip into modules/ and run
php bin/console prestashop:module install ap_cartreminder from the shop folder.
The module sends nothing after the installation. Send reminders is off, so that no customer gets an e-mail before you have read the texts. Before you switch it on:
- Read the texts. In the panels Reminder 1, Reminder 2 and Reminder 3, check the time, the subject and the text of each reminder in every language of your shop. The defaults are short, neutral texts.
- Choose the recipients. By default only customers subscribed to your newsletter get reminders (see "Who gets a reminder" below). Keep it that way unless you are sure you may write to everyone.
- Decide on a discount code. By default there is none (No discount code).
- Check that your shop sends e-mails (Advanced Parameters → E-mail) and send yourself a test with Send a test e-mail in the Sending panel.
- Set up the cron job for each shop with the address shown in the Sending panel, every 15 minutes. Without a cron job, leave Send during shop visits on.
- Switch Send reminders on and click Save.
3. How it works
Which carts get a reminder. A cart is reminded when all of this is true:
- it holds at least one product and has not been ordered;
- it belongs to a customer with an e-mail address: a customer account, or a guest who gave the address in the checkout. Carts of visitors who never gave an address are never touched. The customer must be active and not deleted;
- the cart has not been changed for the time you set for that reminder (Send after (hours)). The times count from the last change of the cart: when the customer changes it, the next reminder waits again;
- the customer is among the recipients you chose (see "Who gets a reminder").
The default times are 1 hour, 24 hours and 72 hours. Each reminder is sent once per cart, never twice.
Who gets a reminder. By default (Recipients = Only customers subscribed to the newsletter) only customers and guests who are subscribed to your newsletter — the newsletter checkbox of the customer form, shown by PrestaShop's newsletter module (ps_emailsubscription). The box for offers from partners does not count: it is not a consent to your own e-mails. The subscription is checked before every reminder, so a customer who unsubscribes from the newsletter gets no further reminder.
For a guest, the consent is the newsletter box ticked in the guest's own order form. PrestaShop does not confirm it with an e-mail, so someone could type another person's address there. The module limits what this can cause: an e-mail address gets at most one cycle — up to three e-mails — per shop in 7 days, every e-mail has an unsubscribe link, and names are printed as plain text, never as a link.
With Every customer with an e-mail address, reminders also go to customers who did not subscribe. Whether you may send them — the consent of the person or another legal basis under the GDPR and the ePrivacy rules of your country — is for you to establish; this manual is not legal advice.
When a reminder is not sent.
- The customer has ordered since. The cart was ordered, a customer with the same e-mail address placed an order in the same shop after the cart's last change, or a cart filled by the reminder's link was ordered. The cycle of that cart ends.
- The customer opted out. They used the unsubscribe link, or (with the default recipients) are no longer subscribed to the newsletter.
- Another cycle is running. Another cart with the same e-mail address got a reminder in the same shop in the last 7 days: the first reminder of the new cart waits.
- No product is available any more. A product that is disabled, no longer available for order, a deleted combination, a product out of stock that cannot be ordered when out of stock, and a customised product are left out of the e-mail. A cart without any available product, or whose available products cost nothing, gets no reminder.
- The cart is too old. A reminder that could not be sent within 48 hours of its time is skipped, and with it the rest of that cart's cycle. When you switch the module on, or after your cron job was down, old carts are therefore never mailed.
- Sending is off. Send reminders is off in that shop, or PrestaShop's e-mails are switched off (Advanced Parameters → E-mail, never send e-mails). Nothing is sent and nothing is recorded.
- The e-mail failed. When the mail server refuses an e-mail, that reminder is marked Not sent and is never sent again for that cart — a server that reports an error may still have delivered it, and a second copy would be worse than a missing one. The next reminder of the cycle still goes out at its time. After three failures in a row the run stops and writes an entry in Advanced Parameters → Logs ("Abandoned Cart Reminder: the run stopped because 3 e-mails in a row could not be sent…"); the other carts are tried by a later run while they are still within their 48 hours.
- Another module skipped it. A developer can skip a reminder with the module's hook (see
README.md).
When the e-mails go out. Reminders are sent in short runs, one shop at a time; two runs of one shop never work at the same time.
- Cron job (recommended): your server calls the shop's address from the Sending panel, for example every 15 minutes. One run sends at most E-mails per run e-mails (50 by default) and works for about 20 seconds; the rest goes with the next run. Two calls less than 60 seconds apart do not start a second run.
- Shop visits (Send during shop visits, on by default): for shops without a cron job, a visit to the shop starts a small run — at most 5 e-mails and about 5 seconds — when the last run of that shop is at least 15 minutes old. The run happens during that visitor's page request.
The time limit of a run is checked between two e-mails. PrestaShop gives a module no way to limit how long one e-mail may take, so with a slow mail server a single e-mail can take as long as that server's own timeout, and a run can last longer than its budget by that one e-mail. If your mail server is slow, use a cron job and switch Send during shop visits off, so that no visitor waits for a run.
The e-mail. The subject and text of the reminder (yours, per language), then up to 10 available products of the cart with their picture, name, combination and quantity × unit price, a line with the number of further products when there are more, the discount code with its value, end date and minimum order when the reminder carries one, the button back to the cart, and at the bottom the reason for the e-mail with the unsubscribe link. The unit price is the customer's current price (their group, the cart's currency, specific prices and quantity discounts, the tax of the cart's tax address or of your shop's default country). No total is shown, because shipping and vouchers are not known yet. The e-mail goes out through your shop's own e-mail settings, from the cart's shop, in the cart's language (see "Texts and languages" in the next section).
The button back to the cart. The link in the e-mail is valid for 30 days. It never signs anyone in and never shows the content of the old cart: it adds the available products of the reminded cart (product, combination, quantity) to the cart of whoever opens it, in their own browser, and opens the cart page with the message "The products of your cart are back." What the customer sees:
- Cart of a guest: the products are added at once, for any visitor who opens the link.
- Cart of a customer account, visitor not signed in: the login page comes first; after signing in, the link opens again and the products are added.
- Cart of an account, visitor signed in to another account: "This cart belongs to another account. Sign out and sign in to the account that received the e-mail."
- The cart was ordered in the meantime: "This cart has already been ordered."
- More than 30 days after the e-mail: "This link has expired."
- No product of the cart is available any more: "The products of this cart are no longer available."
- The link filled too many carts: "This link has been used too many times. Add the products to your cart in the shop." One link can fill at most 10 new or empty carts (for example in different browsers or devices); adding the products to a cart that already holds other products is not limited.
- A wrong or damaged link, a deleted cart, or a link from before a reinstallation of the module: "This link is not valid."
Products are added only up to the quantity of the reminded cart, so a second click adds nothing. PrestaShop's own checks apply: stock, minimum quantity, catalogue mode and categories the visitor's customer group may not see. Customised products, addresses, the carrier and vouchers are not copied; a customer with an account finds their discount code offered in the cart, a guest types it in.
Unsubscribing. Every e-mail ends with the link "Unsubscribe from cart reminders". It opens a page titled "Cart reminders" with the question "Do you want to stop receiving reminders about the products you leave in your cart?" and the button Stop the reminders. Only the button records the choice — opening the link alone changes nothing, because mail security filters often open links before the customer does. Then the page says "You will not receive cart reminders from this shop any more." The link works without signing in and never expires. The opt-out covers this module's reminders in that shop only; the newsletter subscription stays as it is. An opt-out cannot be removed from the Back Office.
What the module stores. The module stores no e-mail address, name or cart content of its own. It keeps:
- for each reminder: the cart, the shop, the customer number, the reminder number, the status, the discount code and a hash of the e-mail address (a fixed fingerprint from which the address cannot be read back) — deleted after 400 days;
- for each cart filled by a reminder's link: which reminded cart it came from — deleted after 400 days;
- for each opt-out: the shop and the hash of the e-mail address — kept for ever, also when the module is uninstalled or reset (see "Uninstall").
When you erase a customer from your shop, these hashes remain: the opt-out hash for ever, the hash of the sent reminders for up to 400 days. They do not contain the address, but someone who already knows or guesses an address can check whether it is in the list. Mention this in your privacy policy if you need to.
The module does not connect to addonspresta.com or any other server, uses no external mailing service, sets no cookies of its own and does not track whether e-mails are opened or links clicked. It does not send SMS or push messages. The product pictures in the e-mail are loaded from your shop by the recipient's mail program.
4. Features and settings
Open Modules → Module Manager → Abandoned Cart Reminder → Configure. The Help box at the top links this manual and the module page at addonspresta.com in the language of your Back Office, gives our support address and shows the installed version. Below it: one form with the panels Reminders, Reminder 1, Reminder 2, Reminder 3 and Discount code — every Save button saves all of them — then the panels Sending, Results and Reminders sent.
Reminders
Send reminders — the main switch, off after the installation. While it is off, nothing is sent and nothing is recorded, by the cron job or by visits.
Recipients
- Only customers subscribed to the newsletter (default) — customers and guests subscribed to your newsletter.
- Every customer with an e-mail address — also customers who did not subscribe. This is your decision and your legal responsibility (see "Who gets a reminder" in the previous section).
Number of reminders — 1, 2 or 3 (default 3). The cycle of a cart ends when the customer orders or unsubscribes, or when a reminder cannot be sent within 48 hours of its time.
Send during shop visits — on by default. For shops without a cron job: a visit starts a small run (up to 5 e-mails) at most every 15 minutes. With a cron job you can switch it off.
E-mails per run — the most e-mails one run of the cron job sends, from 1 to 500 (default 50). A run started by a visit sends at most 5.
Reminder 1, Reminder 2, Reminder 3
Each reminder has its own panel with the same three fields. The settings of reminders above Number of reminders are kept and checked too, so you can raise the number later.
Send after (hours) — hours since the last change of the cart, from 1 to 720 (defaults 1, 24 and 72). Each reminder in use must be later than the one before.
Subject — per language, up to 150 characters, one line, required in the default language.
Text — per language, up to 2000 characters, required in the default language. Plain text, shown above the products of the cart; line breaks are kept.
Texts and languages.
- In subjects and texts you can use
{firstname},{lastname}and{shop_name}; they are replaced by the customer's first name, last name and the name of the shop. - Subjects and texts are plain text: the characters
<and>are refused with the message "Subjects and texts are plain text: they cannot contain the characters < and >, and a subject has one line." You cannot add links, pictures or formatting. - At the installation every language of the shop gets the default texts — in English, Polish, French, German, Spanish or Italian, English for any other language. A language you add to the shop later has empty fields.
- A subject or text left empty in a language uses the one of the default language, and if that is empty too, the English default text.
- The e-mail goes out in the language of the cart when the module (or your theme) has the e-mail template in that language; otherwise in English, with your English subject and text. If English is not installed in your shop, PrestaShop picks the template itself (default language, then English) and the subject and text stay in the cart's language.
- The wording of the e-mail around your text (the button, the discount lines, the footer) comes from the e-mail template and the module's translations.
Discount code
Add a discount code
- No discount code (default);
- From reminder 1, From reminder 2 — the code comes with that reminder and is repeated in the later ones;
- Only in reminder 3.
Discount type — Percentage (of the products), Amount or Free shipping.
Discount value — a percentage from 0.01 to 100, or an amount from 0.01 to 1000000 with tax in the default currency of the shop. Not used for free shipping. Default 10.
Code valid for (days) — from 1 to 365, counted from the day the code is sent (default 7). The code is valid until the end of the last day: with 7, a code sent on Monday morning works until Sunday at 23:59:59, shop time. With 1, only on the day it is sent.
Minimum order — the products of the cart with tax, in the default currency, shipping not included. 0 = no minimum.
How the codes work.
- One code per cart, for one order. It is created when the first reminder that carries it is sent and repeated in the later reminders while it is unused and valid. A cart never gets a second code: when the first one has been used, has expired or was deleted, the later reminders have none.
- Customer account: the code is bound to that customer and offered in their cart.
- Guest: PrestaShop cannot bind a code to a guest who comes back (a returning guest gets a new customer number), so the code is not bound: anyone who has it can use it once, and the guest can pass it on. A person who uses several e-mail addresses can collect one code per address. A minimum order, or no code at all, limits this.
- No combining. Two codes of the module can never be used in the same order. A code of the module cannot be combined either with a voucher that is set as not compatible with other cart rules; other vouchers can be used together with it.
- The codes are ordinary vouchers in Catalog → Discounts: code
CART-followed by 8 random characters, name "Cart reminder discount", descriptionap_cartreminder cart <cart ID>, restricted to the cart's shop in multistore. You can change or delete one there. - Expired codes that were never used are deleted by the following runs; used codes are kept.
- Changes of these settings apply to the codes created afterwards.
Who may give discounts. An employee who may configure this module sets the discount of every reminded cart, up to 100 %. Give the module's Configure permission only to employees who may grant discounts.
Sending
The table shows, for every active shop of the current context that you manage:
- Shop;
- Reminders — On, Off, or PrestaShop e-mails are off when the shop is set to never send e-mails;
- Address for the cron job — the address of that shop;
- Last run — when the last run of that shop started or ended, or not yet.
The cron job. Give the address of each shop to a cron job and call it every 15 minutes or more often — in your hosting panel, or on a server with crontab, for example:
*/15 * * * * curl -fsS "https://your-shop.com/module/ap_cartreminder/cron?token=…" >/dev/null
Copy the address from the panel: each shop has its own, on its own domain, and its token is valid only for that shop. Keep the addresses secret. Anyone who knows one can start the run of that shop — nothing else — and a run sends only the reminders that are due anyway.
Replace the cron addresses — creates new addresses for every shop at once; the old ones stop working ("The cron addresses have been replaced. Update your cron jobs: the old addresses no longer work."). Links in e-mails already sent keep working. Only an employee who manages every shop of the installation sees and can use this button.
Send a test e-mail — type an E-mail address, choose the Reminder and click Send the test e-mail. The
test uses the settings of the first shop of the table and your Back Office language, with sample data only: your
name, two products of the catalogue and the sample code CART-SAMPLE when that reminder carries a code. No customer,
cart or voucher is used or created, and the button and the unsubscribe link lead to the home page. The test also
works while Send reminders is off, but not while the shop's e-mails are switched off. At most 5 test e-mails can be
sent in 10 minutes for the whole installation; after that: "Too many test e-mails in a short time. Wait a few minutes
and try again."
Results
For every shop of the current context that you manage, for the Last 30 days and the Last 12 months:
- Reminders sent — e-mails sent in the period;
- Carts reminded — different carts among them;
- Recovered orders — orders counted as recovered, by the date of the order;
- Recovered value — their total paid with tax, converted to the default currency of the shop.
An order counts as recovered when it is valid (paid or accepted, as PrestaShop marks valid orders), comes from a cart that got at least one reminder or from a new or empty cart filled by the button of a reminder, and was placed after the first reminder and within 30 days after the last one. An order the customer placed from another cart ends the cycle but is not counted. Shops are never added up, because their default currencies may differ.
Reminders sent
The last 50 reminders of the shops of the current context that you manage: Date, Shop, Cart ID, Customer, E-mail address, Reminder, Status, Discount code and Order (the order reference when the cart was ordered). Status:
- Sent — the e-mail was handed over to the mail server;
- Not sent — the mail server refused it; it is not sent again;
- Interrupted — the run stopped before the result was known (for example a PHP timeout); it is not sent again.
The Customer and E-mail address columns are shown only to employees whose profile may view Customers. Other employees see the remaining columns and the note "Customer names and e-mail addresses are not shown: your profile has no access to Customers." The discount code and the order reference are visible to every employee who may configure the module.
5. Multistore
Settings are saved for the shop or shop group selected in the Back Office header. Select All shops to use the same settings everywhere, or one shop to give it its own times, texts and discount. In the All shops or group context only an employee who manages every shop of that context can save; others are asked to select one of their shops.
Each shop works on its own:
- Cron: every shop has its own cron address on its own domain; set up one cron job per shop. The visit trigger works per shop as well.
- Carts and e-mails: a cart is reminded by its own shop, with that shop's settings, texts, address and prices. "Ordered since" and the 7-day limit are checked per shop.
- Codes: a code is valid only in the shop of its cart.
- Opt-outs: unsubscribing stops the reminders of that shop only.
- Results: per shop, never added up.
The Sending, Results and Reminders sent panels show the active shops of the current context that you manage. One licence covers every shop of the installation.
6. Uninstall
Module Manager → Abandoned Cart Reminder → Uninstall deletes the settings, the texts, the two secret keys, the list of sent reminders and the list of carts filled by the links. Remove the cron jobs from your server too.
What is kept:
- The list of opt-outs (table
<prefix>ap_cartreminder_optout, only shop numbers and hashes of e-mail addresses), so that people who unsubscribed do not get reminders again after a reinstallation. Reset in the Module Manager keeps it too. To remove it, uninstall the module and then run this SQL query on the shop's database (with the prefix of your tables, usuallyps_):
DROP TABLE <prefix>ap_cartreminder_optout;
- Discount codes already sent stay in Catalog → Discounts and keep working until they expire; the module no
longer deletes the expired ones. You find them by the description
ap_cartreminder cart. - The declaration of the module's hook for developers, so that other modules attached to it keep their place.
After a reinstallation or a Reset the stored opt-outs still apply, but the links in e-mails sent before it — the button back to the cart and the unsubscribe link — answer "This link is not valid." New e-mails carry new links.
Disable keeps everything, but while the module is disabled no reminder is sent and the links in e-mails already sent show the shop's "page not found" page (error 404).
7. FAQ and troubleshooting
No reminder goes out. Check in this order:
- The Sending panel says On for the shop. Off means Send reminders is off in that shop's context; PrestaShop e-mails are off means Advanced Parameters → E-mail is set to never send e-mails.
- Last run changes: your cron job calls the shop's address, or Send during shop visits is on and the shop has visitors.
- With the default recipients, the customer is subscribed to the newsletter (see the customer's details in Customers → Customers).
- The cart has products that are still available, a customer with an e-mail address, no order, and was last changed more than Send after (hours) ago — but less than 48 hours after that time.
- The customer has not ordered since, has not unsubscribed and did not get a reminder for another cart in the last 7 days.
Reminders sent shows what was sent; Advanced Parameters → Logs shows errors of runs, with entries starting with "Abandoned Cart Reminder".
What does the cron address answer?
A short JSON text, for example {"status":"done","sent":12,"failed":0}, where sent and failed count the e-mails of
that run. The status:
done— the run finished;off— Send reminders is off in that shop;mail_off— the shop's e-mails are switched off in Advanced Parameters → E-mail;busy— another run of that shop is working at this moment;wait— the last run of the shop was less than 60 seconds ago;cart— the call carried the cookie of a shop visitor whose cart has an address. Call the address without cookies, ascurlorwgetdo by default;- HTTP 403 with
{"error":"invalid token"}— the address is wrong or was replaced; copy the current one from the Sending panel. Nothing was run.
The test e-mail does not arrive. Check the mail settings in Advanced Parameters → E-mail with PrestaShop's own test there, and your spam folder. "The test e-mail could not be sent. Check the e-mail settings of the shop." means that the mail server refused it. After 5 tests in 10 minutes, wait a few minutes.
The status of a reminder is "Not sent" or "Interrupted". The mail server refused the e-mail, or the run stopped before the result was known. That reminder is not sent again for that cart — deliberately, to never send it twice. Fix the mail settings; the next reminders are sent at their time.
The discount code is refused in the cart.
- A code of a customer account works only when that customer is signed in.
- The code is used up, expired or deleted, or the products in the cart do not reach the Minimum order.
- The cart already holds another code of this module, or a voucher that is not compatible with other cart rules: remove it first.
The customer says the button in the e-mail does not work. See "The button back to the cart" in section 3 for every message. "This link is not valid." also appears for e-mails sent before the module was reinstalled or reset. "This link has been used too many times. Add the products to your cart in the shop." appears when the link has already filled 10 new or empty carts — some mail security filters open links, and each such opening can count. The customer can always add the products in the shop.
A customer got a reminder in English. The e-mail template does not exist in the language of their cart, so the e-mail is sent in English with your English subject and text. Copy the English template into your theme for that language (next question).
Can I change the look of the e-mail?
Copy mails/<language>/ap_cartreminder.html and .txt from the module to
themes/<your-theme>/modules/ap_cartreminder/mails/<language>/ and edit the copies; they survive updates of the
module. Keep the variables in braces, such as {restore_url} and {unsubscribe_url}.
How do I stop reminders for one customer? The customer uses the unsubscribe link of any reminder. With the default recipients you can also remove their newsletter subscription in Customers → Customers. An opt-out cannot be undone from the Back Office.
Can someone receive reminders they never asked for? A guest's newsletter box is not confirmed by e-mail, so someone could enter another person's address. That address then gets at most three e-mails per shop in 7 days, each with the unsubscribe link. With Every customer with an e-mail address, everyone who leaves a cart with an address may receive reminders — see "Who gets a reminder".
A customer asked to be erased. Erase them in PrestaShop as usual. The module keeps no address or name of its own; the hashes described in "What the module stores" remain (the opt-out for ever, so that they are not written to again).
Does the module send a copy to me, SMS or push messages, or track opens? No. It sends only the e-mail to the customer, through your shop's mail settings, and counts recovered orders from the orders themselves.
8. Updates and support
Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings, texts and opt-outs are kept.
Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.