From 7f240c6bbd41ced28f15855cd32d43aa2f66e56d Mon Sep 17 00:00:00 2001 From: vChabot Date: Wed, 9 May 2012 09:32:43 +0000 Subject: [PATCH] [-] FO : BugFix : #PSCFV-2221 : Column 'price' in order clause is ambiguous by filtering search result --- controllers/front/SearchController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/front/SearchController.php b/controllers/front/SearchController.php index b8a79024a..47ea2809e 100644 --- a/controllers/front/SearchController.php +++ b/controllers/front/SearchController.php @@ -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'];