Jump to content

Product names in mail template


ilerna

Recommended Posts

I'm trying to show products names on a custom mail template I've added to my Prestashop.

If I use the smarty variable {products} I get also the price, quantity, etc.

 

Is there any variables to get only the name or other properties individually?

 

Thanks in advantage

Link to comment
Share on other sites

Solved.

 

In case someone asks the same,

 

I've added a new variable at PaymentModule.php (override folder)

 

Around line 395 I've added:

$products_name_list .= 
'<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';">
	<td style="padding: 0.6em 0.4em;width: 15%;">'.$product['name'].'</td>
	<td style="padding: 0.6em 0.4em;width: 30%;"> </td>
	<td style="padding: 0.6em 0.4em; width: 20%;"> </td>
	<td style="padding: 0.6em 0.4em; width: 15%;"> </td>
	<td style="padding: 0.6em 0.4em; width: 20%;"> </td>
</tr>';

Then defined the variable at 618:

'{products_name}' => $this->formatProductAndVoucherForEmail($products_name_list),

And called at the template with {products_name}

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