Overview
The platform has a comprehensive set of email templates that are triggered via events. For example customer registering would trigger registration email to be sent, or if order transitions to a specific state then email notification is generated for concerned party be it shop owner, customer, supplier etc.
Email templates
Template | Recipients | Since | Initiator | Purpose |
---|---|---|---|---|
adm-cant-allocate-product-qty | shop admin | 1.0.0 | State machine | Out of stock notification |
adm-contactform-request | shop admin | 1.0.0 | Customer | Contact form message |
adm-customer-registered | shop admin | 1.0.0 | Customer | Registration notification (configured at shop level via SHOP_SF_REQUIRE_REG_NOTIFY_TYPES) |
adm-newsletter-request | shop admin | 1.0.0 | Customer | Newsletter sing up form message |
adm-order-canceled | shop admin | 1.0.0 | State machine | Order cancellation |
adm-order-confirmed | shop admin | 1.0.0 | State machine | Order offline payment confirmation |
adm-order-delivery-allocated | shop admin | 1.0.0 | State machine | Stock reserved |
adm-order-delivery-inprogress | shop admin | 1.0.0 | State machine | Order marked as shipping in progress |
adm-order-delivery-inprogress-wait | shop admin | 1.0.0 | State machine | Order marked as shipping in progress but needs payment (capture on shipment) |
adm-order-delivery-packing | shop admin | 1.0.0 | State machine | Order marked as packing (being prepared for shipping) |
adm-order-delivery-ready | shop admin | 1.0.0 | State machine | Order marked as ready for shipping |
adm-order-delivery-ready-wait | shop admin | 1.0.0 | State machine | Order marked as ready for shipping but needs payment (capture on shipment) |
adm-order-new | shop admin | 1.0.0 | State machine | New order notification |
adm-order-payment-confirmed | shop admin | 1.0.0 | State machine | New order offline payment confirmed |
adm-order-returned | shop admin | 1.0.0 | State machine | Order returned |
adm-order-shipping-completed | shop admin | 1.0.0 | State machine | Delivery is completed (could be used to confirm signed for deliveries) |
adm-order-wait-confirmation | shop admin | 1.0.0 | State machine | Order requires offline payment (action for new offline payment orders) |
adm-payment | shop admin | 1.0.0 | State machine | Order online payment notification |
adm-payment-failed | shop admin | 1.0.0 | State machine | Order online payment notification |
adm-payment-shipped | shop admin | 1.0.0 | State machine | Order online payment notification |
adm-payment-shipped-failed | shop admin | 1.0.0 | State machine | Order online payment notification |
adm-refund | shop admin | 1.0.0 | State machine | Order online payment notification |
adm-refund-failed | shop admin | 1.0.0 | State machine | Order online payment notification |
adm-rfq-new | shop admin | 3.0.0 SaaS | State machine
| New request for quote notification |
adm-managedlist-rejected | managed list admin | 3.7.0 SaaS | Customer | Notification sent when customer rejects managed list |
customer-activation | customer | 3.0.0 | Shop owner | Account activated |
customer-change-password | customer | 1.0.0 | Shop owner/Customer | Request to change password and new password notification (depending on password mode for shopcould include or exclude actual password) |
customer-deactivation | customer | 3.0.0 | Shop owner | Account de-activated |
customer-delete | customer | 3.5.0 | Customer | Account deleted (two step process, with token link first and then confirmation) |
customer-registered | customer | 3.0.0 | Shop owner/Customer | Account created |
order-canceled | customer | 1.0.0 | State machine | Order cancellation |
order-confirmed | customer | 1.0.0 | State machine | Order confirmed (offline payment) |
order-delivery-readytoshipping | customer | 1.0.0 | State machine | Order about to be shipped |
order-delivery-shipped | customer | 1.0.0 | State machine | Order is shipped |
order-new | customer | 1.0.0 | State machine | New order |
order-returned | customer | 1.0.0 | State machine | Return for order was processed |
order-shipping-completed | customer | 1.0.0 | State machine | Confirmation that delivery was completed |
payment | customer | 1.0.0 | State machine | Online payment notification |
rfq-new | customer | 3.0.0 SaaS | State machine | RFQ copy to customer |
shipment-complete | customer | 1.0.0 | State machine | Online payment notification |
sup-order-new | supplier | 3.3.0 | State machine | Email order exporter notification to supplier |
managedlist-created | customer | 3.7.0 SaaS | Manager | Notification sent when manager created managed list for customer |
Themes
Shared templates
Email templates follow the same mechanism as page templates, so that they can be adjusted per theme. Email templates are not single file and are split into smaller components.
For example if we consider "customer-registered.html" template it includes "common-header". Thus in a new theme you can just override "common-header" to achieve different look and feel.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>YesCart pure e-commerce</title> </head> <body> <table width="700" border="0" cellpadding="0" cellspacing="0"> ${include('common-header')} <tr> <td style="border: 1px solid #CEE3F6; border-top: 0px;"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="2%"> </td> <td> Dear <b>$firstName $lastName</b>! <br> You are registered at <% if (shopUrl != null && !shopUrl.isEmpty()) { %> <a href="<%out.print(shopUrl.iterator().next())%>">$shopName</a> <% } else { %> $shopName <% }%> shop. <br> <br> Your password is: <b>$password</b> </td> <td width="2%"> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> <td style="border-top: 1px solid #CEE3F6;"> Contact information: </td> <td> </td> </tr> </table> </td> </tr> ${include('common-footer')} </table> </body> </html>
Shop specific templates
For personalised shop specific email templates can also be defined in CMS. In order to declare a component or full template the following SEO URI naming conventions must be used:
Override | CMS URI format | Example filename | Example URI |
---|---|---|---|
HTML template | [SHOP_CODE]_mail_[template name] | customer-registered.html | SHOP10_mail_customer-registered.html |
TXT template | [SHOP_CODE]_mail_[template name] | customer-registered.txt | SHOP10_mail_customer-registered.txt |
Properties template | [SHOP_CODE]_mail_[template name] | customer-registered.properties | SHOP10_mail_customer-registered.properties |
Resources | [SHOP_CODE]_mail_[template name]_[resource name] - template specific or | mail-head.jpeg | SHOP10_mail_customer-registered_mail-head.jpeg |
Testing email templates
Email template preview 3.6.x
This feature is superseded by improved CMS module for email templates, see section below
Shop management editor includes an overview tab which contains Email templates section. Each template appears as a link which will invoke a search dialog where an order placed in a given shop can be searched for to act as an example data for pre-populating email template. Once desired order is found clicking on the link will open a new page that displays the email in its HTML form including all images.
Email template CMS 3.7.0+
Email templates module in CMS allows to search, modify and preview all email templates that are configured for a specific theme.
The module automatically detects the default theme chain for given shop and lists templates that are relevant. Each template has an icon showing whether it is the main templates that defines a type of an email or whether it is a component only.
Email templates can be clicked on to see preview. In order to see a preview an order must be selected. Order information is use to populate placeholders in the email and provide a realistic preview of an email. There are two formats available for preview HTML and TXT, which are the rich text and plain text versions sent with every email.
Each template line has buttons that correspond to the content elements that can be overwritten in CMS to provide shop specific rendering of the template. Overwritten templates will be shown as blue, default ones will remain grey. All buttons are clickable. When clicking on the button normal CMS mode is enabled with filter set to the URI of the content to override. You can copy this URI to define new content in CMS to overwrite the defaults. If you disable the CMS content the email template reverts to defaults.
Configuring recipients and suppressing emails SaaS
By default all emails are sent to shop admin email specified in the shop attributes. In SaaS edition of the platform shop has three additional attributes:
Attribute | Purpose | Example |
---|---|---|
Mail: Shop admin email map | Allows to define emails of recipients of email for specific template | For example snippet below allows to direct new orders to fulfilment department and all confirmed payment notifications to accounting. adm-order-new=fulfilment@shop.com, |
Mail: Shop admin email CC map | Allows to define additional recipients, so that copies of email can be sent. This is especially useful for reseller sites, where copy of confirmed order is sent to the fulfilment company | For example which configuration below copies of new and confirmed orders are sent to orders@mainshop.com (Note that an email is also sent to recipients in "Mail: Shop admin email map" as usual or to "Shop admin email" if not specified) adm-order-new=orders@mainshop.com, adm-order-payment-confirmed=orders@mainshop.com |
Mail: Shop customer disabled emails map | Allows to suppress email notifications to customers. This is useful when you wish to disable some email notifications. | For example the following configuration disabled all shipping notifications: order-delivery-readytoshipping=true, order-delivery-shipped=true, order-shipping-completed=true |