CartThrob includes a notifications system which allows you to send automatic notifications when specific events occur. The content of these notifications is stored in standard EE templates. Each event includes several unique variables that can be used in the templates. Those variables are noted in the [notification events][#notification-events] documentation below.
You can create multiple notifications to be sent to different people. Because all notifications are standard EE templates, you can get very creative with the contents of the email. Please keep in mind though, that because they are EE templates, the more time it takes to render the email, the more time it will take the customer to wait while these notifications are being sent in the background.
To configure a new notification
- Create a template that will contain the content of the email to be sent
- In CartThrob's notifications settings, click "Add Another Row" at the bottom of the notifications panel to add a new notification
- Add a subject line, from name, from email address, to email (use a [variable][#variables] if needed).
- Select the template you created
- Select the event that should trigger the email.
- If you are sending an order status change notification, set the original and new statuses that should trigger the event (more on this below)
- Select the email type. HTML gives you more control over look and feel, but Plain Text is accepted by more mail systems
The backend settings for notifications use the following variables
The full name of the customer
The email address of the customer.
Use these variables in the from name, from email, to email fields as needed.
CartThrob includes the following event notification types by default. CartThrob addons may register additional notification events, and these will automatically be added to the events list.
- Successful Transaction
- Declined Transaction
- Failed Transaction
- Refund Alert
- Customer has left site to complete payment at merchant gateway
- Payment being processed by 3rd party
- Low stock warning
- Order status has been changed
Payment Trigger Events
All payment triggered event email templates should use the submitted_order_info tag to output information about the order in process. The submitted order info tag can be used to output the order's entry id, and other information from that channel entry. See submitted_order_info tag for more detail
Low Stock Warning
Low stock warning email templates can use the following additional variables to output information about the item and its inventory level
the entry id of the item
the inventory level at present
This email is sent whenever the low-stock level is reached. This level is set in the products settings > product options section.
Order Status Has Changed
When an order entry's status is changed, a notification can be sent. You can send a notification when ANY status changes, or when specific status changes take place. For instance, you could send a status notification when an order is changed from Backordered to Shipped. Or you could send a different notification when the status is changed from Completed to Refunded. The following variables are available by default in an order status notification template.
order id that has changed
the current status of the order
the previous status of the order (if it changed)
the channel ID of the orders channel
the url title of the order entry