Get a product’s attribute without load (with label)

Get a product’s attribute without load (with label)

Sometimes, you need to get a precise information about a product, and it’s very boring to load it. Two methods are possible : Collection method $productId = 25; // Your product ID $model = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘attribute_code’) ->addAttributeToFilter(‘entity_id’,$productId) ->getFirstItem(); $attribute_value

We use cookies to ensure that we give you the best experience on our website.
Ok