YC 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.
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 | State machine
| New request for quote notification |
adm-managedlist-rejected | managed list admin | 3.7.0 | 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 | 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 | Manager | Notification sent when manager created managed list for customer |
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:
Because CMS is already language aware you only specify the base name i.e. customer-registered.html (as opposed to customer-registered_en.html) and then simply specify the corresponding language specific version in language specific content body |
Override | CMS URI format | Example filename | Example URI |
---|---|---|---|
HTML template | customer-registered.html | SHOP10_mail_customer-registered.html | |
TXT template | customer-registered.txt | SHOP10_mail_customer-registered.txt | |
Properties template | customer-registered.properties | SHOP10_mail_customer-registered.properties | |
Resources | - template specific or | mail-head.jpeg | SHOP10_mail_customer-registered_mail-head.jpeg |
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.