lagenceapsides Posted February 10, 2017 Share Posted February 10, 2017 Hello all. I would like to add before reference the manufacturer_name in the email_alert module. When i add id_manUfacter in the items_table. All is great, i have the manufacturer id, but i don't know really how i can add the manufacturer name. Can anyone help me? Regards Link to comment Share on other sites More sharing options...
rocky Posted February 11, 2017 Share Posted February 11, 2017 You can simply call a function to get the manufacturer name using the ID: $manufacturer_name = Manufacturer::getNameById($id_manufacturer); Link to comment Share on other sites More sharing options...
lagenceapsides Posted February 13, 2017 Author Share Posted February 13, 2017 Hello. Thx for your reply. I add the function and the variable in the items_table, but it isn't solve. I havent manufacturer name in my alert. my code : $manufacturer_name = Manufacturer::getNameById(id_manufacturer); $items_table .= '<tr style="background-color:'.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding:0.6em 0.4em;">'.$manufacturer_name.'</td> <td style="padding:0.6em 0.4em;">'.$product['product_reference'].'</td> <td style="padding:0.6em 0.4em;"> <strong><a href="'.$url.'">'.$product['product_name'].'</a>' .(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...
ventura Posted February 13, 2017 Share Posted February 13, 2017 Try with this $productObj = new Product((int)$product['product_id'], true, $id_lang, $id_shop); $manufacturer_name = Manufacturer::getNameById($productObj->id_manufacturer); Link to comment Share on other sites More sharing options...
lagenceapsides Posted February 13, 2017 Author Share Posted February 13, 2017 Hello Ventura, Thx a lot ! It works. Have another question. Does you know how block the manual input of quantity in cart and product page ? I have modify prestashop for each time a client add product , the product is add by minimal quantity. But if they press + - on product it isn't work with minimal quantity and if a client do a manual grab it not work. Have you a thing? Regards and thx again. Link to comment Share on other sites More sharing options...
ventura Posted February 13, 2017 Share Posted February 13, 2017 Hello Ventura, Thx a lot ! It works. Have another question. Does you know how block the manual input of quantity in cart and product page ? I have modify prestashop for each time a client add product , the product is add by minimal quantity. But if they press + - on product it isn't work with minimal quantity and if a client do a manual grab it not work. Have you a thing? Regards and thx again. It is better for you and for the forum that open a new topic with this new question Regards Link to comment Share on other sites More sharing options...
lagenceapsides Posted February 13, 2017 Author Share Posted February 13, 2017 Thx. I do. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now