REPrint Posted August 28, 2017 Share Posted August 28, 2017 Dear, I have next situation: I need to get in product-list.tpl the manufacturer, and group. Here is the link i do: https://www.prestashop.com/forums/topic/277309-how-to-group-products-by-manufacturer-in-product-list-category-or-sub-category-pages/ But.... , I need only id_manufacturer and the name, not all Next is the code: if ($this->cat_products) foreach ($this->cat_products as &$product) { $this->manufacturers[$product['id_manufacturer']] = new Manufacturer(intval($product['id_manufacturer']), $this->context->language->id); } $this->context->smarty->assign(array( 'nb_products', $this->nbProducts, 'manufacturers' => $this->manufacturers, )); Link to comment Share on other sites More sharing options...
Scully Posted August 28, 2017 Share Posted August 28, 2017 (edited) Optimize or fixing code? You link to a very very old topic from 2013 which also might not help. And you did not tell us anything on your specific setup. Edited August 28, 2017 by Scully (see edit history) Link to comment Share on other sites More sharing options...
REPrint Posted August 28, 2017 Author Share Posted August 28, 2017 Dear, the code working. Need some fix for the tpl (some ifnot close) Link to comment Share on other sites More sharing options...
Scully Posted August 28, 2017 Share Posted August 28, 2017 Okay, it don't understand it and the last reply dosn't help as well. 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