Stock notification: Notify your customers when items are back in stock
Learn how to set up email notifications so your customers can be notified when out-of-stock products are restocked in your Shoporama online store.
Shoporama has a built-in feature that lets your customers sign up for notifications about out-of-stock products. When the item is back in stock, an email is automatically sent to everyone who has signed up.
For this to work, you need two things in your theme:
- A sign-up form on your product page
- An email template named in_stock_mail.html
All standard themes (Delaware, DelawareDK, California, Alaska, etc.) include both of these by default.
The sign-up form
If you’re building your own theme or want to customize the form, the basic structure looks like this:
<form action="" method="post">
<input type="hidden" name="out_of_stock_signup" value="1"/>
<input type="hidden" name="product_id" value="<{$product->getProductId()}>"/>
<input type="email" name="email" placeholder="Your email" required/>
<label>
<input type="checkbox" name="mailinglist" value="1"/>
Sign up for the newsletter as well
</label>
<input type="submit" value="Notify me"/>
</form>
The important fields are:
- out_of_stock_signup: tells Shoporama that this is an out-of-stock signup
- product_id: the product ID
- email: the customer’s email address
- mailinglist (optional): also subscribes the customer to the newsletter. This is the official field name used in Shoporama’s default themes (Delaware/DelawareDK)
Variants
If you use product variants and want to send a notification for a specific variant, you must include the `attribute_value_id` field with the variant’s ID. In the email template, the variant will be accessible via the `$variant_name` variable.
Email Template
When a product becomes available again, Shoporama automatically sends an email based on the in_stock_mail.html template in your theme. The template has access to the $product object, so you can display the product name, link, and other details.
View Subscribed Customers
You can see who has signed up for stock notifications from the product overview in your admin panel.

Do you have any questions? Contact us at support@shoporama.dk.
Related articles
Export customers who have purchased a specific product
Guide to export a list of customers who have purchased a specific product and send them an email.
Send emails to customers who have purchased a product
Guide to send an email to all customers who have purchased a specific product in your Shoporama online store.
Unsubscribe links in automatic emails
Give your customers the option to unsubscribe from automatic follow-up emails after purchases and product reviews - with a simple link in the email.