Magento Product Attribute Get Value

Viewed 160980

How to get specific product attribute value if i know product ID without loading whole product?

13 Answers

First we must ensure that the desired attribute is loaded, and then output it. Use this:

$product = Mage::getModel('catalog/product')->load('<product_id>', array('<attribute_code>'));
$attributeValue = $product->getResource()->getAttribute('<attribute_code>')->getFrontend()->getValue($product);
Related