www.exclusivepen.eu Posted January 19, 2014 Share Posted January 19, 2014 Hello, I would like to add product manufacturer to following email tempates. order_conf.html new_order.html Can somebody tell me how to achieve it? Im using prestashop 1.5.3.1 if it matters. thanks Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 new_order mail template is a part of mailalerts module so open it (mailalerts.php) and modify $items_table variable there is a foreach loop with this variable: foreach ($products as $key => $product) { $unit_price = $product['product_price_wt']; $customization_text = ''; if (isset($customized_datas[$product['product_id']][$product['product_attribute_id']])) { foreach ($customized_datas[$product['product_id']][$product['product_attribute_id']][$order->id_address_delivery] as $customization) { if (isset($customization['datas'][_CUSTOMIZE_TEXTFIELD_])) foreach ($customization['datas'][_CUSTOMIZE_TEXTFIELD_] as $text) $customization_text .= $text['name'].': '.$text['value'].'<br />'; if (isset($customization['datas'][_CUSTOMIZE_FILE_])) $customization_text .= count($customization['datas'][_CUSTOMIZE_FILE_]).' '.$this->l('image(s)').'<br />'; $customization_text .= '---<br />'; } $customization_text = rtrim($customization_text, '---<br />'); } $items_table .= '<tr style="background-color:'.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding:0.6em 0.4em;">'.$product['product_reference'].'</td> <td style="padding:0.6em 0.4em;"> <strong>' .$product['product_name'].(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '').(!empty($customization_text) ? '<br />'.$customization_text : ''). '</strong> </td> <td style="padding:0.6em 0.4em; text-align:right;">'.Tools::displayPrice($unit_price, $currency, false).'</td> <td style="padding:0.6em 0.4em; text-align:center;">'.(int)$product['product_quantity'].'</td> <td style="padding:0.6em 0.4em; text-align:right;">'.Tools::displayPrice(($unit_price * $product['product_quantity']), $currency, false).'</td> </tr>'; } Link to comment Share on other sites More sharing options...
www.exclusivepen.eu Posted January 24, 2014 Author Share Posted January 24, 2014 Hi vekia thanks for your reply but can you please tell me correct entry for manufacturer variable? I tried this but it doesnt work. <td style="padding:0.6em 0.4em;">'.$product['product_manufacturer'].'</td> Link to comment Share on other sites More sharing options...
vekia Posted January 26, 2014 Share Posted January 26, 2014 use somewhere {$product|print_r} you will see all available variables from $product, i hope that manufacturer is also there Link to comment Share on other sites More sharing options...
Recommended Posts