我怎么能在Magento 得到Attribute model
(来自:eav_attribute
表格)attribute_code
?
注意:
- 我不在乎什么是entity_type.
非常感谢.
小智 53
您必须知道,entity_type
因为您可以attribute_code
为不同的实体拥有相同的内容.所以要获得属性模型:
$attributeModel = Mage::getModel('eav/entity_attribute')->loadByCode($entity_type, $attributeCode);
Run Code Online (Sandbox Code Playgroud)
$entity_type
参数可以是numeric
(id直接),string
(例如'catalog_product'
或Mage_Catalog_Model_Product::ENTITY
)或它可以是模型的实例Mage_Eav_Model_Entity_Type
归档时间: |
|
查看次数: |
44329 次 |
最近记录: |