// Context part 16 (shops)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7664 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -47,7 +47,7 @@ class SearchControllerCore extends FrontController
|
||||
$query = urldecode(Tools::getValue('q'));
|
||||
if ($this->ajaxSearch)
|
||||
{
|
||||
$searchResults = Search::find((int)(Tools::getValue('id_lang')), $query, 1, 10, 'position', 'desc', true, true, (int)$this->id_current_shop);
|
||||
$searchResults = Search::find((int)(Tools::getValue('id_lang')), $query, 1, 10, 'position', 'desc', true);
|
||||
foreach ($searchResults AS &$product)
|
||||
$product['product_link'] = self::$link->getProductLink($product['id_product'], $product['prewrite'], $product['crewrite']);
|
||||
die(Tools::jsonEncode($searchResults));
|
||||
@@ -58,7 +58,7 @@ class SearchControllerCore extends FrontController
|
||||
$this->productSort();
|
||||
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
||||
$this->p = abs((int)(Tools::getValue('p', 1)));
|
||||
$search = Search::find((int)(self::$cookie->id_lang), $query, $this->p, $this->n, $this->orderBy, $this->orderWay, false, true, (int)$this->id_current_shop);
|
||||
$search = Search::find((int)(self::$cookie->id_lang), $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
Module::hookExec('search', array('expr' => $query, 'total' => $search['total']));
|
||||
$nbProducts = $search['total'];
|
||||
$this->pagination($nbProducts);
|
||||
@@ -75,7 +75,7 @@ class SearchControllerCore extends FrontController
|
||||
$this->productSort();
|
||||
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
||||
$this->p = abs((int)(Tools::getValue('p', 1)));
|
||||
$search = Search::find((int)(self::$cookie->id_lang), $query, false, $this->p, $this->n, $this->orderBy, $this->orderWay, true, (int)$this->id_current_shop);
|
||||
$search = Search::find((int)(self::$cookie->id_lang), $query, false, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
Module::hookExec('search', array('expr' => $query, 'total' => $search['total']));
|
||||
$nbProducts = $search['total'];
|
||||
$this->pagination($nbProducts);
|
||||
@@ -90,7 +90,7 @@ class SearchControllerCore extends FrontController
|
||||
{
|
||||
$nbProducts = (int)(Search::searchTag((int)(self::$cookie->id_lang), $tag, true));
|
||||
$this->pagination($nbProducts);
|
||||
$result = Search::searchTag((int)(self::$cookie->id_lang), $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay, true, (int)$this->id_current_shop);
|
||||
$result = Search::searchTag((int)(self::$cookie->id_lang), $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
||||
Module::hookExec('search', array('expr' => $tag, 'total' => sizeof($result)));
|
||||
$this->smarty->assign(array(
|
||||
'search_tag' => $tag,
|
||||
|
||||
Reference in New Issue
Block a user