Page tree
Skip to end of metadata
Go to start of metadata

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

 

TemplateRecipientsSinceInitiatorPurpose
adm-cant-allocate-product-qtyshop admin1.0.0State machineOut of stock notification
adm-contactform-requestshop admin1.0.0CustomerContact form message
adm-customer-registeredshop admin1.0.0CustomerRegistration notification (configured at shop level via SHOP_SF_REQUIRE_REG_NOTIFY_TYPES)
adm-newsletter-requestshop admin1.0.0CustomerNewsletter sing up form message
adm-order-canceledshop admin1.0.0State machineOrder cancellation
adm-order-confirmedshop admin1.0.0State machineOrder offline payment confirmation
adm-order-delivery-allocatedshop admin1.0.0State machineStock reserved
adm-order-delivery-inprogressshop admin1.0.0State machineOrder marked as shipping in progress
adm-order-delivery-inprogress-waitshop admin1.0.0State machineOrder marked as shipping in progress but needs payment (capture on shipment)
adm-order-delivery-packingshop admin1.0.0State machineOrder marked as packing (being prepared for shipping)
adm-order-delivery-readyshop admin1.0.0State machineOrder marked as ready for shipping
adm-order-delivery-ready-waitshop admin1.0.0State machineOrder marked as ready for shipping but needs payment (capture on shipment)
adm-order-newshop admin1.0.0State machineNew order notification
adm-order-payment-confirmedshop admin1.0.0State machineNew order offline payment confirmed
adm-order-returnedshop admin1.0.0State machineOrder returned
adm-order-shipping-completedshop admin1.0.0State machineDelivery is completed (could be used to confirm signed for deliveries)
adm-order-wait-confirmationshop admin1.0.0State machineOrder requires offline payment (action for new offline payment orders)
adm-paymentshop admin1.0.0State machineOrder online payment notification
adm-payment-failedshop admin1.0.0State machineOrder online payment notification
adm-payment-shippedshop admin1.0.0State machineOrder online payment notification
adm-payment-shipped-failedshop admin1.0.0State machineOrder online payment notification
adm-refundshop admin1.0.0State machineOrder online payment notification
adm-refund-failedshop admin1.0.0State machineOrder online payment notification
adm-rfq-newshop admin

3.0.0  SaaS 

State machine

 

New request for quote notification
adm-managedlist-rejectedmanaged list admin

3.7.0  SaaS 

CustomerNotification sent when customer rejects managed list
customer-activationcustomer3.0.0Shop ownerAccount activated
customer-change-passwordcustomer1.0.0Shop owner/CustomerRequest to change password and new password notification (depending on password mode for shopcould include or exclude actual password)
customer-deactivationcustomer3.0.0Shop ownerAccount de-activated
customer-deletecustomer3.5.0CustomerAccount deleted (two step process, with token link first and then confirmation)
customer-registeredcustomer3.0.0Shop owner/CustomerAccount created
order-canceledcustomer1.0.0State machineOrder cancellation
order-confirmedcustomer1.0.0State machineOrder confirmed (offline payment)
order-delivery-readytoshippingcustomer1.0.0State machineOrder about to be shipped
order-delivery-shippedcustomer1.0.0State machineOrder is shipped
order-newcustomer1.0.0State machineNew order
order-returnedcustomer1.0.0State machineReturn for order was processed
order-shipping-completedcustomer1.0.0State machineConfirmation that delivery was completed
paymentcustomer1.0.0State machineOnline payment notification
rfq-newcustomer

3.0.0  SaaS 

State machineRFQ copy to customer
shipment-completecustomer1.0.0State machineOnline payment notification
sup-order-newsupplier3.3.0State machineEmail order exporter notification to supplier
managedlist-createdcustomer

3.7.0  SaaS 

ManagerNotification 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%">&nbsp;</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%">&nbsp;</td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td style="border-top: 1px solid #CEE3F6;">
                            Contact information:
                        </td>
                        <td>&nbsp;</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
OverrideCMS URI formatExample filenameExample URI
HTML template

 [SHOP_CODE]_mail_[template name] 

customer-registered.html
common-header.html

SHOP10_mail_customer-registered.html
SHOP10_mail_common-header.html

TXT template

 [SHOP_CODE]_mail_[template name] 

customer-registered.txt
common-header.txt

SHOP10_mail_customer-registered.txt
SHOP10_mail_common-header.txt

Properties template

 [SHOP_CODE]_mail_[template name] 

customer-registered.properties
common-header.properties

SHOP10_mail_customer-registered.properties
SHOP10_mail_common-header.properties

Resources

 [SHOP_CODE]_mail_[template name]_[resource name]  - template specific or
 [SHOP_CODE]_mail_[resource name]  for shared (e.g. header logo)

mail-head.jpeg

SHOP10_mail_customer-registered_mail-head.jpeg
SHOP10_mail_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
  • No labels