コード例 #1
0
 /**
  * Create filter item object
  *
  * @param string $label Label of the filter value
  * @param mixed  $value Value of the filter
  * @param int    $count Number of result (default is 0)
  * @param string $url   URL of the category
  *
  * @return Mage_Catalog_Model_Layer_Filter_Item
  */
 protected function _createItem($label, $value, $count = 0, $url = null)
 {
     $item = parent::_createItem($label, $value, $count);
     if ($this->getUseUrlRewrites()) {
         $item = Mage::getModel('smile_elasticsearch/catalog_layer_filter_item_category')->setFilter($this)->setLabel($label)->setValue($value)->setCount($count)->setCategoryUrl($url);
     }
     return $item;
 }