User guide
Abandoned Cart for Magento 2: User Guide
Up to three reminder emails for shoppers who leave items in their basket, with the basket contents, a signed link that restores it, an optional single-use coupon and an unsubscribe link.
- Version 2.1.1
- Magento 2.4.6 to 2.4.9
- PHP 8.2 to 8.5
- Hyvä and Luma
Send up to three reminder emails to shoppers who leave items in their basket. Each email shows the basket contents, a signed link that restores the basket, an optional single-use coupon and an unsubscribe link. This guide covers installation, configuration and day-to-day use.
- Demo (Luma): https://demo.commercegears.com/
- Demo (Hyvä): https://demo.commercegears.com/hyva/
- Admin demo: https://demo.commercegears.com/try-admin/abandoned-cart
- Changelog: Release notes · Questions: FAQ

1. Requirements
| Magento | Open Source or Adobe Commerce 2.4.6 to 2.4.9 |
| PHP | 8.2 to 8.5 (Magento 2.4.6: PHP 8.2) |
| Themes | Luma, Blank and themes based on them; Hyvä (unsubscribe page template included) |
| Checkout capture | Luma checkout, and Hyvä's Luma checkout fallback |
| Other | commercegears/module-core (installed automatically), Magento cron running |
One-click List-Unsubscribe headers need Magento 2.4.8 or later; on 2.4.6 and 2.4.7 the emails are sent without them and the unsubscribe link in the email still works.
2. Installation
With Composer. Use the Composer keys from your account on commercegears.com (see https://commercegears.com/composer-access/):
composer config repositories.commercegears composer https://repo.commercegears.com
composer config --auth http-basic.repo.commercegears.com PUBLIC_KEY PRIVATE_KEY
composer require commercegears/module-abandoned-cart
bin/magento setup:upgrade
bin/magento setup:di:compile # production mode only
bin/magento setup:static-content:deploy # production mode only
bin/magento cache:flushTo update later: composer update commercegears/module-abandoned-cart, then the same bin/magento commands.
The module is installed switched off. Nothing is tracked or sent until you set Enabled to Yes.
3. Quick start
- Go to Stores > Configuration > CommerceGears > Abandoned Cart Reminders (or CommerceGears > Abandoned Cart Reminders > Configuration).
- Under General, set Enabled to Yes and choose Send Reminders To.
- Optional: create a cart price rule for the coupon (see section 5) and choose it under Reminder 2 or Reminder 3 > Unique Coupon From Cart Price Rule.
- Open CommerceGears > Abandoned Cart Reminders > Send Test Email, send a test to yourself or click Preview in New Tab.
- Make sure Magento cron runs. The job
commercegears_abandoned_cart_processruns every 5 minutes, records abandoned carts and sends one batch of due reminders.
4. Settings
All settings are under Stores > Configuration > CommerceGears > Abandoned Cart Reminders. The scope of each field is shown next to it.
General
| Setting | What it does |
|---|---|
| Enabled | Switches the module on or off for the scope. When off, carts are not tracked and no reminders are sent. Default: No. |
| Cart Counts as Abandoned After (minutes) | Minutes since the cart was last changed. No reminder is sent while a cart is still being changed. Default: 60. |
| Ignore Carts Older Than (days) | Carts last changed before this are never picked up. Default: 7. |
| Exclude Store Views | Carts from these store views are never reminded. |
| Exclude Customer Groups | Customers in these groups are never reminded, for example Wholesale. NOT LOGGED IN excludes guests. |
| Minimum Subtotal | In the base currency. Leave empty for no minimum. |
| Send Reminders To | Everyone with a known email address or Newsletter subscribers only. Each reminder can override this. People who used the unsubscribe link are always skipped. |
| Capture Guest Email From | Checkout email field, Newsletter sign-up form, Sign-in forms (email typed by a guest). Guests are only reminded when an address was captured from one of these. |
| Email Sender | The store email identity the reminders are sent from. Default: General Contact. |
Reminder 1, Reminder 2, Reminder 3
| Setting | What it does |
|---|---|
| Send Reminder N | Switches this reminder on or off. Default: Yes. |
| Send To | Use General Setting (default), Everyone with a known email address or Newsletter subscribers only. People outside the audience skip this reminder and still get the later ones. Newsletter status is checked when the reminder is due. |
| Send After (hours) | Hours after the cart was last changed. Defaults: 1, 24 and 72. Decimals are allowed (0.5 = 30 minutes). Use a larger value for each later reminder. |
| Email Template | "Abandoned Cart: Reminder N" by default, or your own copy from Marketing > Email Templates. |
| Unique Coupon From Cart Price Rule | Optional. Each email gets its own single-use code from the rule. |
| Coupon Valid For (days) | Unused codes are deleted after this. The rule's own end date still applies. Default: 3. |

Coupon Codes
| Setting | What it does |
|---|---|
| Code Prefix | Default: CART-. Codes look like CART-7KQ2M9XA. |
| Code Length (without prefix) | 6 to 32 characters. Default: 8. |
| Apply Coupon When the Cart Is Restored | The code from the email is applied when the customer follows the restore link. Default: Yes. |
Links and Tracking
| Setting | What it does |
|---|---|
| Restore Link Valid For (days) | Counted from when the email was sent. Default: 14. Unsubscribe links do not expire. |
| Track Opens | Adds a 1x1 tracking image. Open counts are an estimate, because many mail apps block or preload images. Default: Yes. |
| Count as Recovered Within (days) | An order counts as recovered if it is placed from the reminded cart, or by the same email address within this many days of the last reminder. Default: 7. |
Advanced
| Setting | What it does |
|---|---|
| Emails per Cron Run | Default: 100. Remaining reminders are sent on the next run. |
| Keep a Copy of Each Email in the Mail Log | Lets you open exactly what was sent ("View Email"). Default: No. |
| Delete History After (days) | Cart records and mail log entries older than this are deleted, and leave the report. Default: 365. |
5. Coupons
- Go to Marketing > Cart Price Rules > Add New Rule.
- Set the discount you want, Coupon = Specific Coupon and tick Use Auto Generation. Save.
- Choose the rule under Reminder N > Unique Coupon From Cart Price Rule. Only rules set up this way are listed.
Each email gets its own code with usage limit 1. If the same address still has an unused code from the same rule that is valid for at least another day, that code is sent again instead of a new one, and the mail log says so. Unused expired codes are deleted by the hourly cron job commercegears_abandoned_cart_cleanup. To limit discounts for signed-in customers further, set "Uses per Customer" on the rule.
6. What your customers see
The reminder email greets the customer by first name when it is known and lists the cart items with image, name, chosen options, quantity and price, the subtotal, the coupon box when a code was generated, a button back to the basket and a "Stop basket reminders" link. The three default templates have different subjects and wording, for example "You left something in your basket at (store name)" for the first reminder.

The restore link works like this:
- In the browser that still holds the guest cart, the cart is simply reopened.
- In any other browser, the items (and the coupon) are copied into that browser's own cart. The original cart never moves to another session.
- A customer cart is never opened without signing in: the customer is asked to sign in and lands in their cart.
- The mini cart shows the restored basket straight away (Luma and Hyvä).
The unsubscribe page asks the shopper to confirm. Opening the link alone does not unsubscribe, because mail scanners open links. Customers can switch reminders back on from the same page. Unsubscribing from basket reminders does not change the newsletter subscription, and the other way round. An altered or incomplete link shows a short "not valid" message (HTTP status 404).
| Luma | Hyvä (mobile) |
|---|---|
![]() | ![]() |
7. Who gets a reminder
A reminder is sent when all of these are true:
- the store view is enabled and not excluded, the customer group is not excluded and the subtotal reaches the minimum;
- the email address is known and has not used the unsubscribe link on that website;
- the reminder's audience includes the address (newsletter status is read when the reminder is due);
- this is the most recently changed cart of the address on the website. Older carts show "A newer basket for this email address is being reminded", and reminders for different carts of one address are at least 24 hours apart.
A reminder that is not for the address is skipped (mail log status "Skipped", note "Not a newsletter subscriber") and the cart moves on to the next one. "Send Next Reminder Now" in the admin is not limited by the 24-hour rule.
8. Admin tools
All under CommerceGears > Abandoned Cart Reminders.
- Abandoned Carts: customer, items, subtotal, last change, reminder stage, last and next reminder, which reminder is next and who it goes to, status with reason, and the order when there is one. Row actions: Preview Email, Send Next Reminder Now, Stop Reminders. Mass actions: Send Next Reminder Now, Stop Reminders, Delete Records. Run Now runs the cron job straight away. Opens, Clicks, Store View, Recovered Revenue and the "who it goes to" text are under Columns.
- Mail Log: every email with status (Sent, Failed, Skipped), notes, coupon, opens, clicks and whether it led to an order. With "Keep a Copy of Each Email" on, View Email shows the stored copy.
- Recovery Report: abandoned and reminded carts, emails sent, opened and clicked, recovered carts, recovery rate and recovered revenue by day, week or month, per store view, with totals and a chart.
- Send Test Email: any address, any reminder, a sample cart from the catalogue or a tracked cart, and Preview in New Tab. No real coupon is generated and the cart is not changed.


9. Command line
bin/magento commercegears:abandoned-cart:run [--collect-only] [--send-only] [--dry-run] [--limit=N]
bin/magento commercegears:abandoned-cart:preview [--cart=ID] [--store=ID] [--reminder=1|2|3] [--output=file.html]
bin/magento commercegears:abandoned-cart:test <email> [--cart=ID] [--store=ID] [--reminder=1|2|3]
bin/magento commercegears:abandoned-cart:stats [--from=Y-m-d] [--to=Y-m-d] [--period=day|week|month] [--store=ID]
bin/magento commercegears:abandoned-cart:unsubscribe <email> [--website=ID|code] [--remove]
bin/magento commercegears:abandoned-cart:unsubscribe --list [<email>] [--website=ID|code]rundoes what the cron job does;--dry-runlists the reminders that would be sent.previewrenders a reminder without sending it;testsends one to an address (logged as a test).statsprints the report figures by period.unsubscribeadds an address to the opt-out list (all websites unless--websiteis given) and stops its open reminders, for example when a customer asks by phone;--removeallows reminders again.
10. Permissions (ACL)
Under System > Permissions > User Roles > Role Resources > CommerceGears > Abandoned Cart Reminders:
| Resource | Allows |
|---|---|
| Abandoned Carts | The Abandoned Carts grid and email preview |
| Send Reminders and Test Emails | Send Next Reminder Now, Run Now, Send Test Email |
| Stop and Delete | Stop Reminders, Delete Records and deleting Mail Log entries |
| Mail Log | The Mail Log |
| Recovery Report | The Recovery Report |
| Abandoned Cart Configuration | The configuration section |
11. Privacy (GDPR)
- Guest addresses are stored on the guest's own cart record only.
- When a customer account is deleted, its abandoned cart records and mail log entries are deleted too.
- Carts that were never emailed are deleted after 30 days (or after "Ignore Carts Older Than", if longer); everything else after "Delete History After". The unsubscribe list is kept, so unsubscribed addresses stay unsubscribed.
- Choose "Send Reminders To" according to your local rules on marketing email, and mention basket reminders in your privacy policy.
12. Troubleshooting
| Problem | Solution |
|---|---|
| No carts appear in the grid | Check General > Enabled for the store view, that cron runs, and that the cart is idle for longer than "Cart Counts as Abandoned After". Guests need a captured email address. Click Run Now to run the job straight away. |
| A cart shows "Not eligible" | The status note gives the reason, for example the subtotal is below the minimum, the address is not a newsletter subscriber, or a newer basket for the address is being reminded. |
| Emails are logged but not received | With "Disable Email Communications" on (Stores > Configuration > Advanced > System), emails are rendered and logged with a note but not delivered. Otherwise check your mail transport. |
| No coupon in the email | The rule must have Coupon = Specific Coupon and "Use Auto Generation", be active and not expired. The mail log notes why a code was not generated. |
| A restore link says it has expired | Links are valid for "Restore Link Valid For" days after sending. Rotating the store's crypt key also invalidates links already sent. |
| Guest emails are not captured on a custom checkout | The checkout capture supports the Luma checkout. Other checkouts need a small integration that posts the address to abandonedcart/capture/email. |
| Report revenue looks mixed | Recovered revenue is summed in each order's base currency; with several base currencies the total mixes them. |
13. Uninstall
bin/magento module:disable CommerceGears_AbandonedCart
composer remove commercegears/module-abandoned-cart
bin/magento setup:upgrade
bin/magento cache:flushThe tables commercegears_abandoned_cart, commercegears_abandoned_cart_log and commercegears_abandoned_cart_unsubscribe stay in the database until you drop them. Generated coupon codes stay on their cart price rules.
This guide is for version 2.1.1 and also comes with the module, in docs/user-guide.md. All user guides

