// Fixed warning and prepared next commit

This commit is contained in:
Damien Metzger
2013-10-31 15:09:14 +01:00
parent a97e3927df
commit 9a1b45a8e6
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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);