// Add the attribute code here.
$attribute=$product->getResource()->getAttribute("color");
// Checking if the attribute is either select or multiselect type.
if($attribute->usesSource()){
// Getting all the sources (options)
$options = $attribute->getSource()->getAllOptions(false);
}
// print as label-value pair
echo '<pre>'. print_r($options) .'</pre>';
Thanks,
– Bijal Bhavsar 🙂
Posts Tagged ‘options’
Get Attribute options and values
Posted: April 6, 2010 in Magento, Version 1.3.*Tags: attribute, option id, options, vaule
2