vaibhav178 Posted December 12, 2014 Share Posted December 12, 2014 (edited) I am trying to show subcategory name of a product on invoice. I was successful in showing category name by adding following code in getProducts() in classes/order/orderinvoice.php file:- $sql = "SELECT `name` FROM `ps_category_lang`, `ps_product` WHERE `ps_product`.`id_product`='".(int)$row['id_product']."' AND `ps_product`.`id_category_default`=`ps_category_lang`.`id_category` AND `ps_category_lang`.`id_lang`=1"; $row['product_category'] = Db::getInstance()->getValue($sql); and then adding following code in pdf/invoice.tpl file :- {$order_detail.product_category} Can anyone please tell how to get subcategory name of product on invoice ? Edited December 12, 2014 by vaibhav178 (see edit history) 1 Link to comment Share on other sites More sharing options...
tuk66 Posted December 12, 2014 Share Posted December 12, 2014 Look at these methods (1.4.9.0): Product::getProductCategories() Product:.getProductCategoriesFull() Link to comment Share on other sites More sharing options...
Recommended Posts