Jump to content

Product reference in out of stock email notification


Giordx

Recommended Posts

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

  • 11 months later...

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

  • 1 year later...
  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...