How to get a product value attribute from attribute id?
Try this:
$attributeModel = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product','color');
echo $attributeModel->getStoreLabel($storeId);
If you want to get any attribute value of any product ;
$_product = Mage::getModel('catalog/product')->load($productId);
echo $_product->getData($attributeCode);
Try this
Retrieve product attribute value based on the attribute code
<?php
$attributeCode = "size";
$attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', $attributeCode);
$options = Mage::getModel('eav/entity_attribute_source_table')
->setAttribute($attribute)
->getAllOptions(false);
foreach ($options as $option) {
echo $option['label']." => ".$option['value']."<br>";
}
?>
Retrieve product attribute value based on the attribute id
<?php
$attributeId = 198;
$attribute = Mage::getModel('eav/entity_attribute')->load($attributeId);
$options = Mage::getModel('eav/entity_attribute_source_table')
->setAttribute($attribute)
->getAllOptions(false);
foreach ($options as $option) {
echo $option['label']." => ".$option['value']."<br>";
}
?>