🇬🇧 English | 🇫🇷 Version française
PrestaShop module that injects the product reference / combination reference into stock alert emails generated by the native ps_emailalerts module.
Compatible with PrestaShop 1.7.x and PrestaShop 8.x
Developed by Studio 109
The native PrestaShop module ps_emailalerts sends stock alert emails but does not include the product reference.
This module adds a new email variable: {product_reference}
allowing messages such as:
T-SHIRT BLUE (Reference: TS-BL-68) is almost out of stock.
instead of:
T-SHIRT BLUE is almost out of stock.
- adds
{product_reference}variable to stock alert emails - supports product combinations
- no core modification
- no override
- no modification of
ps_emailalerts - compatible with PrestaShop 1.7 and 8
- safe install / uninstall
The module uses two hooks.
Triggered when product stock changes.
Stores temporarily:
id_productid_product_attribute
Triggered just before email sending.
The module:
- checks if template =
productoutofstock - retrieves product reference
- injects
{product_reference}into email template variables
Upload the module ZIP via:
Modules → Module Manager → Upload a module
Upload folder:
/modules/tsmailvars/
Then install the module from the back office.
Check in:
Design → Positions
Hook:
actionUpdateQuantity
Order must be:
tsmailvarsps_emailalerts
Add the reference in the stock alert email template:
{product} (Reference: {product_reference}) is almost out of stock.
Example paths:
themes/yourtheme/mails/fr/modules/ps_emailalerts/mails/fr/productoutofstock.html
themes/yourtheme/mails/fr/modules/ps_emailalerts/mails/fr/productoutofstock.txt
Before:
T-SHIRT BLUE is almost out of stock.
After:
T-SHIRT BLUE (Reference: TS-BL-68) is almost out of stock.
Tested with:
- PrestaShop 1.7.8
- PrestaShop 8.x
Studio 109
https://www.studio109prod.com
https://www.trophee-sportif.com
MIT