From 9a1b45a8e61415e30b6ebf954242459ada5fc8a6 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 31 Oct 2013 15:09:03 +0100 Subject: [PATCH] // Fixed warning and prepared next commit --- controllers/front/SearchController.php | 2 ++ modules/blockcategories/blockcategories.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/front/SearchController.php b/controllers/front/SearchController.php index 349137a79..ce6e3a176 100644 --- a/controllers/front/SearchController.php +++ b/controllers/front/SearchController.php @@ -93,6 +93,8 @@ class SearchControllerCore extends FrontController $this->p = abs((int)(Tools::getValue('p', 1))); $query = Tools::replaceAccentedChars(urldecode($query)); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); + foreach ($search['result'] as &$product) + $product['link'] .= '&search_query='.urlencode($query).'&results='.(int)$search['total']; Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts); diff --git a/modules/blockcategories/blockcategories.php b/modules/blockcategories/blockcategories.php index 54f8dcac7..247cdcf75 100644 --- a/modules/blockcategories/blockcategories.php +++ b/modules/blockcategories/blockcategories.php @@ -235,7 +235,7 @@ class BlockCategories extends Module $resultIds[$row['id_category']] = &$row; } - $blockCategTree = $this->getTree($resultParents, $resultIds, $maxdepth, (isset($category) ? $category->id : null)); + $blockCategTree = $this->getTree($resultParents, $resultIds, $maxdepth, ($category ? $category->id : null)); $this->smarty->assign('blockCategTree', $blockCategTree); if ($category)