// Fixed warning and prepared next commit
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user