Product Stock Reminders
Supported by the Stock Reminders section, this article described how to set-up the Stock Reminders in the Product Details templates.
Using this system you can have Aurora allow customers to request reminders to be sent out to them when your products come back into stock.
Overview
Customers can provide their email address and even select a specific product variation (size for example) and ask that they be notified when the product/variation comes back in stock.
How to do this?
This enables the use of this feature alongside the changes described in the Stock Reminders section.
The Product Details Page
Please see the very simple example below that can be placed into the Product Details template (products/details.tpl.html) to allow customers to request a stock reminder when the product or any one of it's variations are out of stock.
{if $product.product_stock == 0 OR $no_stock_variations}
<p><a href="" title="" class="details_request_stock">Is your size unavailable? Receive email when back in stock</a></p>
{/if}
When clicked, this link triggers the Stock Reminder pop-up to appear.
The Stock Reminder Template
The pop-up that appears by default is driven by Aurora's own library of Java Script functions, but can be customised by editing (or creating if it is not already present) the "products/ajax-request-stock.tpl.html" template.
This template can be found in the Aurora Demo Example Template Package, but has been included below for reference.
<div class="popup_form_container">
<div class="popup_form_container_popups" style="display: none;">
<div class="correctbox"></div>
</div>
<div class="popup_form {*popup_form_on*}">
<h2>Stock reminder</h2>
<div class="details_request_stock_form_errorbox errorbox" style="display: none;">
<p>Please fill in the fields marked red below</p>
</div>
<form action="" method="post" class="form details_request_stock_form">
<fieldset>
<p>Fill in the form below for a reminder when your size is back in stock.</p>
<p>
<label for="request_stock_email_address">Email Address</label>
<input type="text" name="request_stock_email_address" id="request_stock_email_address" value="" class="textfield"/>
<div class="popup_form_label_error_description"></div>
</p>
{if $no_stock_variations}
<p>
<label>Size</label>
<select name="request_stock_variation_id" id="request_stock_variation_id">
<option value="">Select Size</option>
{foreach from=$no_stock_variations item="variation"}
<option value="{$variation.id}">{$variation.attribute_value}</option>
{/foreach}
</select>
{/if}
<div class="popup_form_label_error_description"></div>
</p>
<hr />
<p class="buttonspacer"><input type="submit" name="submit" value="Remind me" class="template_button" /></p>
<div class="clear"></div>
</fieldset>
</form>
</div>
</div>
Updated over 2 years ago