protected function _getPriceExpression($filter, $select, $replaceAlias = true) { if (Mage::helper('amshopby')->landingNewFilter()) { $replaceAlias = false; } return parent::_getPriceExpression($filter, $select, $replaceAlias); }
protected function _getPriceExpression($filter, $select, $replaceAlias = true) { if ($this->_dataHelper->landingNewFilter()) { $replaceAlias = false; } return parent::_getPriceExpression($filter, $select, $replaceAlias); }
/** * Get comparing value sql part * * @param float $price * @param Mage_Catalog_Model_Layer_Filter_Price $filter * @param bool $decrease * @return float */ protected function _getComparingValue($price, $filter, $decrease = true) { if (Mage::helper('catalin_seo')->isEnabled() && Mage::helper('catalin_seo')->isPriceSliderEnabled()) { $currencyRate = $filter->getLayer()->getProductCollection()->getCurrencyRate(); return $price / $currencyRate; } return parent::_getComparingValue($price, $filter, $decrease); }
protected function _getPriceExpression($filter, $select, $replaceAlias = true) { // if (Mage::helper('amlanding')->newFilterActive()) { // $replaceAlias = false; // } $replaceAlias = false; return parent::_getPriceExpression($filter, $select, $replaceAlias); }
/** * Apply price range filter to product collection * * @param Mage_Catalog_Model_Layer_Filter_Price $filter * @return Mage_Catalog_Model_Resource_Layer_Filter_Price */ public function applyPriceRange($filter) { if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) { return parent::applyPriceRange($filter); } $collection = $filter->getLayer()->getProductCollection(); if (!method_exists($collection, 'checkSearchaniseResult') || !$collection->checkSearchaniseResult()) { return parent::applyPriceRange($filter); } // Disable internal price filter. return $this; }
/** * Apply attribute filter to product collection * * @deprecated since 1.7.0.0 * @param Mage_Catalog_Model_Layer_Filter_Price $filter * @param int $range * @param int $index the range factor * @return Mage_Catalog_Model_Resource_Layer_Filter_Price */ public function applyFilterToCollection($filter, $range, $index) { if (!Mage::helper('catalogfilter')->priceIsSlider()) { return parent::applyFilterToCollection($filter, $range, $index); } $select = $filter->getLayer()->getProductCollection()->getSelect(); $priceExpr = $this->_getPriceExpression($filter, $select); $filter->getLayer()->getProductCollection()->getSelect()->where($priceExpr . ' >= ' . $this->_getComparingValue($range * ($index - 1), $filter))->where($priceExpr . ' <= ' . $this->_getComparingValue($range * $index, $filter, false)); return $this; }
protected function _construct() { parent::_construct(); }