$productId = 10;
$attributeName = 'my_attribute_name';
$product = Mage::getModel('catalog/product')->load($productId);
$attributes = $product->getAttributes();
$attributeValue = null;
if(array_key_exists($attributeName , $attributes)){
$attributesobj = $attributes["{$attributeName}"];
$attributeValue = $attributesobj->getFrontend()->getValue($product);
}
echo $attributeValue; //attribute value for 'my_attribute_name'
Advertisement

Perfect, thank you!This is an excellent resource.
How do we reference our ustom product attribute in a transactional email?
{{var … ?}}
…And if you do post and answer, also post example for simple (integer or text) variable?
Thank you. This has been an awesome help. I was creating a custom shipping module which used an API which needed weight, height, length and width of the consignment. Since other than weight all three were custom attributes I wasn’t getting them in my ‘Mage::getModel(“checkout/cart”)->getItems()->getData();’ code. Thanks to you you finally saved me after 1.5 days of scouring the net.
Thanks Asad,
This is also great post, Keep it up buddy
Thanks a lot, that saved me a lot of time. How much of your time have you spent blogging Magento? You so are an internet high-and-mighty at it!
Thanks again, Dougen.
Not that much actually.. Sp.. For last 6/8 months couldn’t manage time to write any thing new..
hello Asad,
how to get attribute collection of particuler attribute set in magento????
Thanks
Please explain the syntax where getfrontend method is used.
Very much thanks. Man, you don’t imagine how you hepled me with this!!
Thank you man!