属性セットから属性名のリストを取得したい。属性IDを取得する方法は知っていますが、名前のリストを取得する方法がわかりません。これはこれまでの私のコードです。
<?php
$entityTypeId = Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId();
$attributeSetName = 'Brands';
$attributeSetId = Mage::getModel('eav/entity_attribute_set')
->getCollection()
->setEntityTypeFilter($entityTypeId)
->addFieldToFilter('attribute_set_name', $attributeSetName)
->getFirstItem()
->getAttributeSetId();
$attributes = Mage::getModel('catalog/product_attribute_api')->items($attributeSetId);
foreach($attributes as $_attribute){
var_dump($_attribute);
}
?>