public function __construct() { parent::__construct(); if ($this->helper('sm_shopby')->isEnabled() && $this->helper('sm_shopby')->isMultipleChoiceFiltersEnabled()) { $this->setTemplate('sm/shopby/catalog/layer/filter.phtml'); } }
public function __construct() { parent::__construct(); if ($this->getLayeredNavLimitHelper()->getLimit()) { $this->setTemplate('eyemagine/layerednavlimit/catalog/layer/filter.phtml'); } }
public function __construct() { parent::__construct(); if (Mage::getStoreConfig('layerednavigationajax/layerfiler_config/enabled')) { $this->setTemplate('magentothem/layerednavigationajax/attribute.phtml'); } }
public function __construct() { parent::__construct(); //Load Custom PHTML of attributes $this->setTemplate('layerednav/filter_attribute.phtml'); //Set Filter Model Name $this->_filterModelName = 'layerednav/layer_filter_attribute'; }
/** * Class constructor */ public function __construct() { parent::__construct(); if ($this->helper('catalin_seo')->isEnabled() && $this->helper('catalin_seo')->isMultipleChoiceFiltersEnabled()) { /** * Modify template for multiple filters rendering * It has checkboxes instead of classic links */ $this->setTemplate('catalin_seo/catalog/layer/filter.phtml'); } }
/** * Initialize filter model object * The only thing we need here is to set our own template for price filter * * @return FACTFinder_Asn_Block_Catalog_Layer_Factfinder */ public function init() { parent::init(); $attribute = $this->getAttributeModel(); if ($attribute->getType() == self::TYPE_SLIDER) { $this->setTemplate('factfinder/asn/layer/filter/slider.phtml'); $this->setData(current($attribute->getItems())); $this->setUnit($attribute->getUnit()); $this->setLinkCount($attribute->getLinkCount()); } return $this; }
public function getTheItems() { $items = array(); foreach (parent::getItems() as $_item) { $attributeCode = $_item->getFilter()->getAttributeModel()->getAttributeCode(); $optionId = $_item->getValueString(); $attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter($attributeCode)->getFirstItem(); $attributeId = $attributeInfo->getAttributeId(); $_collection = Mage::getResourceModel('eav/entity_attribute_option_collection')->setPositionOrder('asc')->setAttributeFilter($attributeId)->setStoreFilter(0)->load(); foreach ($_collection->toOptionArray() as $_cur_option) { if ($_cur_option['value'] == $optionId) { $theLabel = $_cur_option['label']; } } preg_match_all('/((#?[A-Za-z0-9]+))/', $theLabel, $matches); if (count($matches[0]) > 0) { $color_value = $matches[1][count($matches[0]) - 1]; $findme = '#'; $pos = strpos($color_value, $findme); } else { $pos = false; } $item = array(); $item['url'] = $this->htmlEscape($_item->getUrl()); $item['label'] = $_item->getLabel(); $item['code'] = $attributeCode; $item['count'] = ''; if (!$this->getHideCounts()) { $item['count'] = ' (' . $_item->getCount() . ')'; } $item['image'] = ''; $item['bgcolor'] = ''; if (Mage::helper('colorselectorplus')->getSwatchUrl($optionId)) { $item['image'] = Mage::helper('colorselectorplus')->getSwatchUrl($optionId); } elseif ($pos !== false) { $item['bgcolor'] = $color_value; } else { $item['image'] = Mage::helper('colorselectorplus')->getSwatchUrl('empty'); } if ($_item->isSelected()) { $item['is_selected'] = 1; } else { $item['is_selected'] = 0; } $items[] = $item; } return $items; }
/** * Initialize Price filter module * */ public function __construct() { parent::__construct(); $this->setTemplate('vc_shopbybrands/catalog/layer/brands/filter.phtml'); }
/** * Set filter model name * */ public function _construct() { parent::_construct(); $this->_filterModelName = 'Mage_CatalogSearch_Model_Layer_Filter_Attribute'; }
/** * Set filter model name * */ public function __construct() { parent::__construct(); $this->_filterModelName = 'catalogsearch/layer_filter_attribute'; }
public function __construct() { parent::__construct(); $this->setTemplate('dmc_solr/catalog/layer/filter.phtml'); $this->_filterModelName = 'solr/catalog_layer_filter_attribute'; }
public function __construct() { parent::__construct(); $this->setTemplate('weltpixel/layerednavigation/catalog/layer/filter.phtml'); $this->_filterModelName = 'catalog/layer_filter_attribute'; }
/** * Initialize filter template * */ protected function _prepareFilter() { parent::_prepareFilter(); if (Mage::helper('gomage_navigation')->isGomageNavigation() && !Mage::registry('subdomain')) { switch ($this->getAttributeModel()->getFilterType()) { default: $this->_template = 'gomage/navigation/layer/filter/default.phtml'; break; case GoMage_Navigation_Model_Layer::FILTER_TYPE_IMAGE: $this->_template = 'gomage/navigation/layer/filter/image.phtml'; break; case GoMage_Navigation_Model_Layer::FILTER_TYPE_DROPDOWN: $this->_template = 'gomage/navigation/layer/filter/dropdown.phtml'; break; } } }
public function __construct() { parent::__construct(); // $this->setTemplate('multiselectnavigation/filter_attribute.phtml'); $this->_filterModelName = 'multiselectnavigation/catalog_layer_filter_attribute'; }
public function getItemsCount() { $cnt = parent::getItemsCount(); $showAll = !Mage::getStoreConfig('amshopby/general/hide_one_value'); return $cnt > 1 || $showAll ? $cnt : 0; }
public function __construct() { parent::__construct(); $this->setTemplate('vc_priceslider/catalog/layer/filter.phtml'); }
/** Implement custom sorting for items if configured * * @see Mage_Catalog_Model_Layer_Filter_Abstract::getItems() * @author ksenevich@aitoc.com */ public function getItems() { $items = parent::getItems(); $featuredLimit = Mage::helper('adjnav/featured')->getFeaturedValuesLimit(); $featuredLimitDisabled = $featuredLimit == 0; if (!Mage::helper('adjnav/featured')->isRangeValues()) { return $items; } $usesRanges = array(); $names = array(); $attributeId = $this->getAttributeModel()->getId(); $optionUses = Mage::getModel('adjnav/eav_entity_attribute_option_stat')->getSortedOptions($attributeId); foreach ($items as $k => $item) { $item->setSortRange(0); if (isset($optionUses[$item->getValueString()])) { $item->setSortRange($optionUses[$item->getValueString()]); } } //usort($items, array($this, 'sortItems')); $featuredIndex = array(); $names = array(); foreach ($items as $k => $item) { $item->setSortRange(0); if ($k < $featuredLimit || $featuredLimitDisabled) { if ($featuredLimitDisabled) { $item->setSortRange(1000000 - $k); } else { $item->setSortRange($featuredLimit - $k); } } } //usort($items, array($this, 'sortItems')); return $items; }
public function __construct() { parent::__construct(); $this->setTemplate('vc_ajaxlayerednavigation/catalog/layer/filter.phtml'); }
public function __construct() { parent::__construct(); $this->setTemplate('adjnav/filter_attribute.phtml'); $this->_filterModelName = 'adjnav/catalog_layer_filter_attribute'; }
public function __construct() { parent::__construct(); $this->_filterModelName = 'smvendors/catalog_layer_filter_vendor'; }