Ejemplo n.º 1
0
 /**
  * Get price range for building filter steps
  *
  * @return int
  */
 public function getPriceRange()
 {
     if ($range = intval(Mage::helper('ecommerceteam_sln')->getConfigData('pricerange'))) {
         if ($range > 0) {
             return $range;
         }
     }
     return parent::getPriceRange();
 }
Ejemplo n.º 2
0
 /**
  * Get price range for building filter steps
  *
  * @return int
  */
 public function getPriceRange()
 {
     if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
         return parent::getPriceRange();
     }
     $collection = $this->getLayer()->getProductCollection();
     if (!method_exists($collection, 'checkSearchaniseResult') || !$collection->checkSearchaniseResult()) {
         return parent::getPriceRange();
     }
     $newRange = $collection->getSearchaniseRequest()->getPriceRangeFromAttribute($this->getAttributeModel());
     if (!$newRange) {
         return parent::getPriceRange();
     }
     $rate = Mage::app()->getStore()->getCurrentCurrencyRate();
     if (!$rate || $rate == 1) {
         // nothing
     } else {
         $newRange *= $rate;
     }
     return $newRange;
 }
Ejemplo n.º 3
0
 /**
  * @magentoConfigFixture current_store catalog/layered_navigation/price_range_calculation manual
  * @magentoConfigFixture current_store catalog/layered_navigation/price_range_step        1.5
  */
 public function testGetPriceRangeManual()
 {
     // what you set is what you get
     $this->assertEquals(1.5, $this->_model->getPriceRange());
 }