[-] FO : instant search relevancy fixed #PSCFV-4267
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17454 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -72,7 +72,7 @@ class SearchControllerCore extends FrontController
|
|||||||
$this->productSort();
|
$this->productSort();
|
||||||
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
|
||||||
$this->p = abs((int)(Tools::getValue('p', 1)));
|
$this->p = abs((int)(Tools::getValue('p', 1)));
|
||||||
$search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
|
$search = Search::find($this->context->language->id, $query, 1, 10, 'position', 'desc');
|
||||||
Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total']));
|
Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total']));
|
||||||
$nbProducts = $search['total'];
|
$nbProducts = $search['total'];
|
||||||
$this->pagination($nbProducts);
|
$this->pagination($nbProducts);
|
||||||
|
|||||||
@@ -8,10 +8,12 @@
|
|||||||
{if $MENU_SEARCH}
|
{if $MENU_SEARCH}
|
||||||
<li class="sf-search noBack" style="float:right">
|
<li class="sf-search noBack" style="float:right">
|
||||||
<form id="searchbox" action="{$link->getPageLink('search')}" method="get">
|
<form id="searchbox" action="{$link->getPageLink('search')}" method="get">
|
||||||
<input type="hidden" name="controller" value="search" />
|
<p>
|
||||||
<input type="hidden" value="position" name="orderby"/>
|
<input type="hidden" name="controller" value="search" />
|
||||||
<input type="hidden" value="desc" name="orderway"/>
|
<input type="hidden" value="position" name="orderby"/>
|
||||||
<input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|escape:'htmlall':'UTF-8'}{/if}" />
|
<input type="hidden" value="desc" name="orderway"/>
|
||||||
|
<input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|escape:'htmlall':'UTF-8'}{/if}" />
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user