diff --git a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php index a71e588497d..6390996e95a 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php @@ -309,7 +309,7 @@ public function loadPrices($filter, $limit, $offset = null, $lowerPrice = null, if (!is_null($upperPrice)) { $select->where("$priceExpression < " . $this->_getComparingValue($upperPrice, $filter)); } - $select->order("$priceExpression ASC")->limit($limit, $offset); + $select->order(new Zend_Db_Expr("$priceExpression ASC"))->limit($limit, $offset); return $this->_getReadAdapter()->fetchCol($select); } @@ -372,7 +372,7 @@ public function loadNextPrices($filter, $price, $rightIndex, $upperPrice = null) if (!is_null($upperPrice)) { $pricesSelect->where("$priceExpression < " . $this->_getComparingValue($upperPrice, $filter)); } - $pricesSelect->order("$priceExpression DESC")->limit($rightIndex - $offset + 1, $offset - 1); + $pricesSelect->order(new Zend_Db_Expr("$priceExpression DESC"))->limit($rightIndex - $offset + 1, $offset - 1); return array_reverse($this->_getReadAdapter()->fetchCol($pricesSelect)); }