Magento - How do I get a list of my custom attributes options?
I want to get a l开发者_C百科ist of my custom attributes' options, in order to create a menu of them.
The custom attribute is: nf_features and the label is Features.
Thank!
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', '158');
foreach ( $attribute->getSource()->getAllOptions(false) as $option){
echo $option['label']."<br>";
}
精彩评论