Search This Blog

Thursday, 24 May 2012

Get a list of attribute options from Magento using attribute code

$attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'color');
if ($attribute->usesSource()) {
    $options = $attribute->getSource()->getAllOptions(false);
}

No comments:

Post a Comment