CartThrob Expired Cart Notifications Version 2.1.0
Overview
CartThrob Expired Cart Notifications sends follow-up emails for carts that were started but not completed.
Core behavior:
- tracks cart email and expiration state while customers add to cart
- marks carts as completed when checkout is authorized
- sends staged notifications based on configured timing rules
- supports additional recurring follow-ups after initial staged notifications
- supports debug mode so repeated test sends do not advance expiration counters
Requirements
- CartThrob installed and active (installation is blocked when CartThrob is missing)
- ExpressionEngine support milestones from changelog:
2.0.0: ExpressionEngine 5 support2.1.0: ExpressionEngine 6 support
Installation
- Upload
cartthrob_expired_cart_notificationsto/system/user/addons/. - Install
CartThrob Expired Cart Notificationsin ExpressionEngine Add-on Manager. - Create one or more email templates that will be used for cart notifications.
- Open add-on settings and configure notification events plus additional notification settings.
- Configure a scheduled ping for the generated CRON URL.
Upgrading
From versions before 2.0
- Uninstall older add-on version.
- Install again using the current installation steps.
From 2.0+
- Upload new files over existing add-on files.
- Run add-on update in ExpressionEngine.
- Recheck settings and CRON URL in add-on settings.
Start Here (10-Minute Setup)
- Create one notification template in EE templates (example:
emails/abandoned_cart_1hr). - In
Expired Cart Notificationssettings, add oneNotification eventsrow:
- Minutes to notification: 60
- Notification template: your template path
- Notification email subject: short subject line
3. Set How many times should this customer be contacted? to 1.
4. Set How many days between customer notifications? to 7.
5. Copy the generated CRON URL and schedule it to run regularly.
6. Create a test cart with an email address, wait past threshold, then trigger CRON URL.
Common Tasks With Examples
1. Create Tiered Initial Notifications
Goal: send different messages at multiple minute thresholds.
Example rows:
- 30 minutes: reminder
- 180 minutes: stronger follow-up
- 1440 minutes: one-day reminder
Each row selects its own template and subject.
2. Configure Ongoing Follow-Ups
Goal: continue outreach after initial tiered notifications.
How many times should this customer be contacted?: max additional follow-up cyclesHow many days between customer notifications?: interval between additional cyclesAdditional notification template: generic long-term reminder templateAdditional notification subject: subject for that generic reminder
3. Test Without Burning Through Carts
Goal: repeatedly test same abandoned cart payload.
- enable
Notification debug = yes - run CRON URL repeatedly
- verify emails send while cart
expiredcounters are not advanced by debug mode
Quick Links For Existing Users
- Need minute-based first-pass notifications: use
Notification eventsgrid. - Need long-term recurring reminders: use
Additional regular notificationssettings. - Need the endpoint to schedule: copy
CRON Notification URLfrom settings. - Need safe repeated testing: use
Notification debug.
Control Panel Reference
Route: addons/settings/cartthrob_expired_cart_notifications
Settings Form Fields
Notification events (grid)
Columns:
Minutes to notification(notify_minutes)Notification template(notification_template)Notification email subject(notification_subject)
Behavior:
- grid rows are stored in serialized setting
notification_events - rows are sorted by
notify_minutesbefore processing
Additional regular notifications
How many days between customer notifications?(notify_every)
- intended day interval for additional recurring notifications
How many times should this customer be contacted?(notification_attempts)
- number of additional recurring notification passes
Additional notification template(additional_notification_template)
- fallback template used for additional recurring notifications
Additional notification subject(additional_notification_subject)
- fallback subject used for additional recurring notifications
CRON Notification URL
- read-only URL generated from the
get_expired_cartsaction ID - this URL must be called on a schedule to process notifications
Debug settings
Notification debug(notification_debug, yes/no)
- when yes, carts are not marked as checked/expired-incremented
- useful for repeated test runs against same cart dataset
CRON Processing
Action method: get_expired_carts
Initial staged notifications
- reads
notification_events - sorts by
notify_minutes - for each row, finds carts where:
order_id IS NULL(not completed)expired = <grid row index>email_addresspresent- cart timestamp older than configured minute threshold
- cart payload length indicates non-empty cart
- sends configured template+subject for that row
Additional recurring notifications
- runs up to
notification_attempts - uses additional reminder path after staged rows are exhausted
- sends through standard CartThrob notification event path when no custom row template is passed
Order-state tracking hooks
cartthrob_add_to_cart_startupdates cart row with email, resetsexpiredto0, clearsorder_idcartthrob_on_authorizewritesorder_idso completed carts stop matching abandoned-cart queries
Known setting mismatch in current code
Control Panel stores notify_every, but processor reads check_expired for additional cadence. If check_expired is not set, code falls back to 7 * attempt_number days.
Notification Template Variables
Notification payload includes customer/cart data and CartThrob cart-info totals.
Commonly used values (from live docs and current processing path):
- customer contact fields:
first_name,last_name,email_address,phone, address/shipping fields - cart totals:
total,subtotal,tax,shipping,discount - cart item loop:
itemswith item fields such asentry_id,quantity,price,title - cart metadata:
url,id - CartThrob
cart_infovariables (formatted totals and counts)
Testing and Debugging
Suggested test loop:
- Add at least one notification event.
- Set a short threshold (for example, 1 minute).
- Enable debug mode.
- Build a cart while logged in with a known email.
- Wait past threshold.
- Call CRON URL manually.
- Verify email delivery and variable rendering.
- Repeat while debug mode is on.
Changelog
Version 2.1.0
Released June 9, 2021
- ADDED: ExpressionEngine 6 support.
Version 2.0.0
- ADDED: ExpressionEngine 5 support.
Version 1.07
- FIXED: issue where settings would not save.
- FIXED: issue where adding a new notification could create duplicate rows with limited save/remove behavior.
- ADDED: additional item and totals variables available in notifications.
- FIXED: issue where debug setting was ignored.