I added an attribute test through admin panel, which can be set to yes/no value. I want to display the value of test whether it is set to yes or no. How can I do that?
I tried something like that:
<?php
$attributeModel = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product','test');
echo $attribute_value = $attributeModel->getStoreLabel($storeId);
$_product = Mage::getModel('catalog/product')->load($productId);
echo $_product->getData('test');
?>
Best Answer
Try This