Follow

Back in Stock Notifications

Customer Self Service features 'Notify Me' functionality, whereby users can elect to be emailed when out-of-stock products in their shopping cart come back into stock.* 

When a user clicks the 'Notify Me' button, the unavailable product is automatically removed from the cart and an email address is requested.

A scheduled task runs at regular intervals, checking stock availability against notification requests. When a requested product becomes available, the email to the user is triggered. 

*Please note - this functionality is only available from version 3.79 onward.

Step-by-step guide

To enable Back in Stock Notifications: 

  1. Login to the CMS.
  2. Navigate to Layouts --> Templates.
  3. Click the Cart template.
  4. Click 'Add Widget' in any zone (for example Zone Header Right). The feature will behave the same regardless of zone placement.
  5. Select the 'Stock Availability Popup' widget and click 'Add'.
  6. Click 'Edit' to configure options. 
  7. Update messages (optional) and click 'Save'
  8. Still in the Cart template, locate the Order Lines widget and click 'Edit'.
  9. Tick the option to 'Show 'Notify Me When In Stock' button'.
  10. Edit the 'Notify Me When In Stock Button Label' (optional) and click 'Save'
  11. Navigate to Content --> Content Editor and click 'New'.
  12. Set the values as follows:
    • Template Type - Email Template
    • Template Name - StockAvailabilityNotifyEmailTemplate (This must be exact)
    • Version - Razor 
    • Template Description - a description of your choice

  13. Click the 'Code Editor' tab. 
  14. Paste in the email template code contained at the end of this article.
  15. Click 'Save & Close'.
  16. Navigate to Content --> Assign Default Templates
  17. Search the page for 'stock' to locate the 'Stock Availability Notify Email Template' field.
  18. Update this field with the Template Description entered at Step 12 (you may need to click 'Show Others' to search the template list).
  19. Click 'Update' at the bottom of the page.
  20. Navigate to Settings --> Scheduler Maintenance.
  21. Click 'New' and update the values as follows: 
    • Begin the task - On a schedule
    • Name - Stock Availability
    • Active - ticked
    • Task - Stock Availability Notify Task
    • Schedule - Repeat Period
    • Period - X Minutes (this can be set to run however often Stock Availability runs on your site's Integrator). 
  22. Click 'Save'
  23. Navigate to Settings --> Dictionary
  24. Tick the 'System Control' box and click 'Refresh Cache'

 A confirmation message will display when complete.

 

 

Email template code

@{
var product = Model.Product;
var list = new List<string>();
product.MoveThruStart();
while (product.MoveThru())
{
list.Add(product.ProductCode);
}
var products = string.Join(", ", list);
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
@Raw(Model.TemplateUtil.Subtemplate("EmailHeaderSubTemplate"))
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
<center>
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer">
@Raw(Model.TemplateUtil.Subtemplate("EmailBannerSubTemplate"))
<tr>
<td align="center" valign="top">
<!-- START BODY -->
<table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody">
<tr>
<td valign="top">
<!-- Full Width Column -->
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td valign="top" class="bodyContent">
<!-- 1 Column -->
<table border="0" cellpadding="20" cellspacing="0" width="100%">
<tr>
<td valign="top">
<div>
<h1 class="h1">Available Stock Notification</h1>
<br />
<table border="0" cellpadding="20" cellspacing="0" width="100%">
<tr>
<p>The following products are now back in stock:</p>
<p><a href="@product["SEOUrl"]">@product["Description"]</a></p>
</tr>
</table>
</div>
</td>
</tr>
</table>
<!-- 1 Column -->
</td>
</tr>
</table>
<!-- Full Width Column -->
</td>
</tr>
</table>
<!-- END BODY -->
</td>
</tr>
@Raw(Model.TemplateUtil.Subtemplate("EmailFooterSubTemplate"))
</table>
<br />
</td>
</tr>
</table>
</center>
</body>
</html>

 

Have more questions? Submit a request

Comments

Powered by Zendesk