Jump to content

Part numbers not showing up in emails from mailalerts module


Recommended Posts

I cannot get the part numbers to show up in the new order emails that I receive. I am attaching the files that I am looking at as the source of the problem. There is the html file as well as a mailalerts.php file. I believe the problem lies in the mailalerts.php file line 166. For some reason the part number is not inlcuded in the itemstable. Please help! I really appreciate it.

mailalerts.php

new_order.html

Link to comment
Share on other sites

Attached is an image of what the current email looks like, with another image of what it used to look like with the part numbers included. I just want to get it back to how it was last year with the part numbers showing up on the email alerts.

29260_DCiBlCcTq1dg2kNv9Kao_t

29261_omf0wjmTFRQ4nrK6kQbt_t

Link to comment
Share on other sites

If those part numbers are in the product reference field, they should be displayed. Here's what's on line 110 of modules/mailalerts/mailalerts.php on my PrestaShop v1.3.1 site:

'.$product['reference'].'



Is your line the same? If so, it seems $product['reference'] is blank for some reason.

Link to comment
Share on other sites

After looking in the catalog tab in the backend, all of the part numbers are in the "name" catagory. Is there a way to modify the code to call on the name catagory in the mail alert, or do I have to move all the part numbers to the reference category in the backend?

Link to comment
Share on other sites

To avoid modifying code, it would better to move all the part numbers into the reference field. Otherwise, you will need to add code like the following to get the name of the default category of the product before line 108 ($itemsTable .=):

$category = new Category($product['id_category_default'], intval($id_lang));



then change line 110 from:

'.$product['reference'].'



to:

'.$category->name.'



That will add the category name as the product reference.

Link to comment
Share on other sites

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...