Jump to content

1.5 Add products features in order confirmation email


websurgaronne

Recommended Posts

Hello everyone,

I need to display the products features in the order_confirmation email of an old Prestashop 1.5.

Didn't seem too complicated but I'm completely stuck : 

in classes/PaymentModule.php

line 353, inside 

foreach ($products as $key => $product)

I tryed to add

$lesfeatures = Product::getFrontFeaturesStatic((int)$id_lang, $product['id_product']);
                      
foreach ($lesfeatures as $key => $lafeature) {                        
	$machin .= print_r($lafeature);
	$machin .= $lafeature['id_feature'].'name:'.$lafeature['name'].'value:'.$lafeature['value'].'<br>';
  											} 

and around line 405 I add the variable in the product description of the order e-mail

<td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</strong>'.$machin.'</td>

 

But all I get is the features ID : no name, no value.

Should I use something different from getFrontFeaturesStatic ? Do I use it wrong ?

 

Thanks for your help.

 

 

 

 

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