[*] PROJECT : New Module API (part 1)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9790 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -64,7 +64,7 @@ class SearchControllerCore extends FrontController
|
||||
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
||||
$this->p = abs((int)(Tools::getValue('p', 1)));
|
||||
$search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
Module::hookExec('search', array('expr' => $query, 'total' => $search['total']));
|
||||
Hook::exec('search', array('expr' => $query, 'total' => $search['total']));
|
||||
$nbProducts = $search['total'];
|
||||
$this->pagination($nbProducts);
|
||||
$this->context->smarty->assign(array(
|
||||
@@ -81,7 +81,7 @@ class SearchControllerCore extends FrontController
|
||||
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
||||
$this->p = abs((int)(Tools::getValue('p', 1)));
|
||||
$search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
Module::hookExec('search', array('expr' => $query, 'total' => $search['total']));
|
||||
Hook::exec('search', array('expr' => $query, 'total' => $search['total']));
|
||||
$nbProducts = $search['total'];
|
||||
$this->pagination($nbProducts);
|
||||
$this->context->smarty->assign(array(
|
||||
@@ -96,7 +96,7 @@ class SearchControllerCore extends FrontController
|
||||
$nbProducts = (int)(Search::searchTag($this->context->language->id, $tag, true));
|
||||
$this->pagination($nbProducts);
|
||||
$result = Search::searchTag($this->context->language->id, $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
Module::hookExec('search', array('expr' => $tag, 'total' => count($result)));
|
||||
Hook::exec('search', array('expr' => $tag, 'total' => count($result)));
|
||||
$this->context->smarty->assign(array(
|
||||
'search_tag' => $tag,
|
||||
'products' => $result, // DEPRECATED (since to 1.4), not use this: conflict with block_cart module
|
||||
@@ -138,4 +138,4 @@ class SearchControllerCore extends FrontController
|
||||
if (!$this->instant_search && !$this->ajax_search)
|
||||
$this->addCSS(_THEME_CSS_DIR_.'product_list.css');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user