Example #1
0
 /**
  * Apply attribute filter to product collection
  *
  * @param Mage_Catalog_Model_Layer_Filter_Price $filter
  * @param int $range
  * @param int $index    the range factor
  * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute
  */
 public function applyFilterToCollection($filter, $range, $index)
 {
     if (!Mage::helper('searchanise/ApiSe')->checkSearchaniseResult(true)) {
         return parent::applyFilterToCollection($filter, $range, $index);
     }
     $collection = $filter->getLayer()->getProductCollection();
     if (!method_exists($collection, 'checkSearchaniseResult') || !$collection->checkSearchaniseResult()) {
         return parent::applyFilterToCollection($filter, $range, $index);
     }
     // Disable internal price filter.
     return $this;
 }