Giordx Posted December 21, 2011 Share Posted December 21, 2011 Hi, someone know how to customize the out of stock email notification to include product reference? Actually it show only the product name but for my shop is not enought cause I have many object with same name. thanks for every help Giord Link to comment Share on other sites More sharing options...
alreadynight Posted December 12, 2012 Share Posted December 12, 2012 You can change the mailalert.php code (path /modules/mailalerts/mailalerts.php) at line 438. Add a new line like this $_prod = new Product($id_product); And add a new variable to array $template_vars (used during email sending) like this $template_vars = array( '{qty}' => $quantity, '{last_qty}' => $ma_last_qties, '{reference}' => $_prod->reference, '{product}' => $product_name); Now you have a new variable called "reference" and you can use it in your email template (edit email template from backoffice or, if you preferer, edit file directly at path /modules/mailalerts/mails/productoutofstock.html) Link to comment Share on other sites More sharing options...
Kenguru Posted January 27, 2014 Share Posted January 27, 2014 Doesnt work for me. Mail alert 3.2, prestashop 1.5.6...Any new specifications? Link to comment Share on other sites More sharing options...
vekia Posted January 27, 2014 Share Posted January 27, 2014 you used {$reference} variable somewhere in template files? it's necessary it's worth to ask, because no one said this here Link to comment Share on other sites More sharing options...
alreadynight Posted January 27, 2014 Share Posted January 27, 2014 Now you have a new variable called "reference" and you can use it in your email template (edit email template from backoffice or, if you preferer, edit file directly at path /modules/mailalerts/mails/productoutofstock.html) Link to comment Share on other sites More sharing options...
Kenguru Posted January 27, 2014 Share Posted January 27, 2014 ive done everything, i have those lines on mailaerts.php and {reference} is on right place...but i cant get reference number to emails. Link to comment Share on other sites More sharing options...
Vali Iacobescu Posted July 5, 2016 Share Posted July 5, 2016 (edited) Please, master Vekia, tell me, step by step, how to accomplish this implementation. Prestashop 1.6.1.0 Thanks! Edited July 5, 2016 by Vali Iacobescu (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now