Skip to main content
added 228 characters in body
Source Link
Qaisar Satti
  • 32.5k
  • 18
  • 87
  • 137

simple add this function in your price model

public function getPrices()
    {  
          $collection = $this->getLayer()->getProductCollection();

         $data[]=array('from' =>$collection->getMinPrice(),
            'to' =>$collection->getMaxPrice());
         return $data;
    }

in your price block

get them like that

public function getPrices()
{                          
     return Mage::getModel($this->_filterModelName)->getPrices();
}

this will give maximum and minimum price for recent collection

this is model core class

Mage/Catalog/Model/Layer/Filter/Price.php

core block price

Mage/Catalog/Block/Layer/Filter/Price.php

Don't change in core files if you want to change them copy in app/code/local

simple add this function in your price model

public function getPrices()
    {  
          $collection = $this->getLayer()->getProductCollection();

         $data[]=array('from' =>$collection->getMinPrice(),
            'to' =>$collection->getMaxPrice());
         return $data;
    }

in your price block

get them like that

public function getPrices()
{                          
     return Mage::getModel($this->_filterModelName)->getPrices();
}

this will give maximum and minimum price for recent collection

simple add this function in your price model

public function getPrices()
    {  
          $collection = $this->getLayer()->getProductCollection();

         $data[]=array('from' =>$collection->getMinPrice(),
            'to' =>$collection->getMaxPrice());
         return $data;
    }

in your price block

get them like that

public function getPrices()
{                          
     return Mage::getModel($this->_filterModelName)->getPrices();
}

this will give maximum and minimum price for recent collection

this is model core class

Mage/Catalog/Model/Layer/Filter/Price.php

core block price

Mage/Catalog/Block/Layer/Filter/Price.php

Don't change in core files if you want to change them copy in app/code/local

Source Link
Qaisar Satti
  • 32.5k
  • 18
  • 87
  • 137

simple add this function in your price model

public function getPrices()
    {  
          $collection = $this->getLayer()->getProductCollection();

         $data[]=array('from' =>$collection->getMinPrice(),
            'to' =>$collection->getMaxPrice());
         return $data;
    }

in your price block

get them like that

public function getPrices()
{                          
     return Mage::getModel($this->_filterModelName)->getPrices();
}

this will give maximum and minimum price for recent collection