コード例 #1
0
ファイル: Attribute.php プロジェクト: hyhoocchan/mage-local
 /**
  * Check whether specified attribute can be used in LN
  *
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
  * @return bool
  */
 protected function _getIsFilterableAttribute($attribute)
 {
     return $attribute->getIsFilterable();
 }
コード例 #2
0
 /**
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
  * @return bool
  */
 public function isIndexableAttribute(Mage_Catalog_Model_Resource_Eav_Attribute $attribute)
 {
     if ($attribute->getBackendType() == 'varchar' && !$attribute->getBackendModel()) {
         return true;
     }
     if ($attribute->getBackendType() == 'int' && $attribute->getSourceModel() != 'eav/entity_attribute_source_boolean' && ($attribute->getIsSearchable() || $attribute->getIsFilterable() || $attribute->getIsFilterableInSearch())) {
         return true;
     }
     if ($attribute->getIsSearchable() || $attribute->getIsFilterable() || $attribute->getIsFilterableInSearch()) {
         return true;
     }
     return false;
 }
コード例 #3
0
ファイル: Attribute.php プロジェクト: SalesOneGit/s1_magento
 /**
  * Check whether specified attribute can be used in LN
  *
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
  * @return bool
  */
 protected function _getIsFilterableAttribute($attribute)
 {
     if (Mage::registry("current_category")) {
         return $attribute->getIsFilterable();
     }
 }