[-] FO : BugFix : #PSCFV-2221 : Column 'price' in order clause is ambiguous by filtering search result

This commit is contained in:
vChabot
2012-05-09 09:32:43 +00:00
parent fcc2a27804
commit 7f240c6bbd
+2
View File
@@ -89,6 +89,8 @@ 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)));
if ($this->orderBy == 'price')
$this->orderBy = 'product_shop.price';
$search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay);
Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total']));
$nbProducts = $search['total'];