From 855c8a8de4fe07afcba50089feb997fe033dcf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 7 Nov 2013 18:33:49 +0100 Subject: [PATCH] // add 2 useful hooks --- controllers/front/CategoryController.php | 4 ++++ themes/default-bootstrap/product-list.tpl | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php index 95e1efd6e..e6480cdb6 100644 --- a/controllers/front/CategoryController.php +++ b/controllers/front/CategoryController.php @@ -199,6 +199,10 @@ class CategoryControllerCore extends FrontController // Pagination must be call after "getProducts" $this->pagination($this->nbProducts); + Hook::exec('actionProductListModifier', array( + 'nb_products' => &$this->nbProducts, + 'cat_products' => &$this->cat_products, + )); foreach ($this->cat_products as &$product) if ($product['id_product_attribute'] && isset($product['product_attribute_minimal_quantity'])) diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index 415bf80dd..2b514b6ea 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -22,13 +22,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - {if isset($products)} - {*define numbers of product per line in other page for desktop*} - {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} @@ -122,9 +117,7 @@ {/if}
- + {hook h='displayProductListFunctionalButtons' product=$product} {if isset($comparator_max_item) && $comparator_max_item}