facky75 Posted October 15, 2014 Share Posted October 15, 2014 Hello everyone, I'm trying to make different product-list template depending on the category. Everything works fine exept when I search with blocklayered it shows my default product list. I've found the part of the code which manage that in /modules/blocklayered/blocklayered.php : if ($nb_products == 0) $product_list = $this->display(__FILE__, 'blocklayered-no-products.tpl'); else $product_list = $smarty->fetch(_PS_THEME_DIR_.'product-list.tpl'); And I tried to do that: if ($nb_products == 0) $product_list = $this->display(__FILE__, 'blocklayered-no-products.tpl'); elseif ( $category->id> == 16) $product_list = $smarty->fetch(_PS_THEME_DIR_.'product-list16.tpl'); else $product_list = $smarty->fetch(_PS_THEME_DIR_.'product-list.tpl'); But it's not working I would be very grateful if someone could help me PS: I'm on prestashop 1.5 Link to comment Share on other sites More sharing options...
facky75 Posted October 15, 2014 Author Share Posted October 15, 2014 I found a way putting my condition directly in product-list.tpl But if someone has a better solution it would be much appreciated 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