Commerce Reference Store has a number of JSPs that are used to dynamically construct e-mail messages that are sent out when customers perform certain actions. There are 8 top-level e-mail templates:
store.war/emailtemplates/abandonedOrderPromo.jsp
-- Message granting a promotion giving the customer 10% off his or her next order. This message is sent by a scenario that is triggered if the customer abandons a shopping cart. See the Scenarios That Grant Promotions section in the Personalization chapter.store.war/emailtemplates/backInStockNotify.jsp
-- Message informing a customer that a specific product or SKU is back in stock. This message is sent to customers who have explicitly requested notification, as described in the Back in Stock Emails section of the Inventory Management chapter.store.war/emailtemplates/emailAFriend.jsp
-- Message with information about a specific product. A customer creates this message by clicking the Email link on the product detail page. Commerce Reference Store then displays a form that the customer fills out, specifying the recipient’s email address and the message text.store.war/emailtemplates/registeredUser.jsp
-- Message confirming that the customer has successfully created a new account.store.war/emailtemplates/changePassword.jsp
-- Message confirming that the customer has changed the password for his or her account.store.war/emailtemplates/newPassword.jsp
-- Message containing a new temporary password for the customer’s account. This message is sent when the customer clicks the “Forgot your password?” link on the Login page and fills in the email address associated with the account.store.war/emailtemplates/orderConfirmation.jsp
-- Message confirming placement of a new order. The message is sent by a scenario that is triggered when the order is submitted. See the Scenarios That Confirm Orders and Shipment section in the Personalization chapter.store.war/emailtemplates/orderShipped.jsp
-- Message sent to a customer when an order has been shipped. The message is triggered by the Fulfillment system when the order’s shipping group has been marked as shipped. See the Scenarios That Confirm Orders and Shipment section in the Personalization chapter.
Like other top-level pages, these templates render much of their content through inclusion of gadgets and other JSP files. For example, store.war/emailtemplates/backInStockNotify.jsp
includes store.war/emailtemplates/gadgets/backInStockSkuDetails.jsp
.
The e-mail templates take into account the site context, so messages can display site information, such as the large icon for the site they are associated with. To create links, the templates use the /atg/dynamo/droplet/multisite/SiteLinkDroplet
servlet bean to render fully qualified URLs. Site configuration properties are used to set the e-mail sender addresses. For example, the sender address for orderShipped.jsp
is taken from the site configuration’s orderShippedFromAddress
property.
Unlike other Commerce Reference Store pages, the e-mail JSPs contain inline styling information, rather than referring to external .css
files. This is because some e-mail clients don’t support external .css
files. As a result, the styling for a given page is the same for all sites.