leonetrek Posted December 14, 2014 Share Posted December 14, 2014 (edited) How to Add Product Short Description into invoice pdf? Prestashop 1.6.0.9 Edited December 14, 2014 by leonetrek (see edit history) Link to comment Share on other sites More sharing options...
leonetrek Posted December 14, 2014 Author Share Posted December 14, 2014 Tried classes/order/OrderInvoice.php: change: public function getProductsDetail() { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT * FROM `'._DB_PREFIX_.'order_detail` od LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = od.product_id LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop) WHERE od.`id_order` = '.(int)$this->id_order.' AND od.`id_order_invoice` = '.(int)$this->id); } to: public function getProductsDetail() { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT * FROM `'._DB_PREFIX_.'order_detail` od LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = od.product_id LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON pl.id_product = od.product_id LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop) WHERE od.`id_order` = '.(int)$this->id_order.' AND od.`id_order_invoice` = '.(int)$this->id); } Didn't work 1.6.0.9 Link to comment Share on other sites More sharing options...
tuk66 Posted December 15, 2014 Share Posted December 15, 2014 I would rather create a static method and call it in the template. Something like: public static function getProductDescription($id_lang, $id_product, $id_product_attribute = null) { ... SQL query ... } Link to comment Share on other sites More sharing options...
leonetrek Posted December 15, 2014 Author Share Posted December 15, 2014 I would rather create a static method and call it in the template. Something like: public static function getProductDescription($id_lang, $id_product, $id_product_attribute = null) { ... SQL query ... } tuk66 thanks for the reply. And you can details? I'm not very good at PHP Link to comment Share on other sites More sharing options...
pandorrah Posted December 18, 2014 Share Posted December 18, 2014 go to: root/pdf/invoice.tpl check for: $order_detail.product_ean13change to: $packItem.description_short Link to comment Share on other sites More sharing options...
Recommended Posts