有了属性集,如何获取它包含的属性列表(或者更好的是,仅获取不属于默认属性集的自定义属性)?
属性集本身可以通过多种方式获取,例如:
$entityTypeId = Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId();
$attributeSet = Mage::getResourceModel('eav/entity_attribute_set_collection')->setEntityTypeFilter($entityTypeId)->addFilter('attribute_set_name', 'Default');
请注意,我需要使用属性集,因此从产品获取属性列表不是我正在寻找的解决方案。
Mage::getModel('catalog/product_attribute_set_api')->items();
获取属性集本身。
Mage::getModel('catalog/product_attribute_api')->items($setId);
获取属性inside属性集。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)