Engine23

Magento - EAV get option values

When ever you have an catalog product attribute and are looking for the options, here is the code sample you need to get the values.

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

Share: