/** * @return string - filter position * @param Amasty_Shopby_Block_Catalog_Layer_Filter_Attribute $filter * - used in app/design/frontend/base/default/template/amasty/amshopby/view_top.phtml */ public function getAttributePosition($filter) { if (is_object($filter->getAttributeModel())) { $attributeId = $filter->getAttributeModel()->getAttributeId(); $settings = $this->getAttributesSettings(); if (array_key_exists($attributeId, $settings)) { return "amshopby-filter-position-" . $settings[$attributeId]->getBlockPos(); } } if ($filter instanceof Mage_Catalog_Block_Layer_Filter_Price) { return "amshopby-filter-position-" . Mage::getStoreConfig('amshopby/block/price_pos'); } if ($filter instanceof Amasty_Shopby_Block_Catalog_Layer_Filter_Stock) { return "amshopby-filter-position-" . Mage::getStoreConfig('amshopby/block/stock_filter_pos'); } if ($filter instanceof Mage_Catalog_Block_Layer_Filter_Category) { return "amshopby-filter-position-" . Mage::getStoreConfig('amshopby/block/categories_pos'); } if ($filter instanceof Amasty_Shopby_Block_Catalog_Layer_Filter_Rating) { return "amshopby-filter-position-" . Mage::getStoreConfig('amshopby/block/rating_filter_pos'); } return ""; }
public function __construct() { parent::__construct(); $this->_filterModelName = 'catalogsearch/layer_filter_attribute'; }