Magento 1.9 – Show Attribute Label

attributesmagento-1.9product-attribute

I am trying to display the label for my attribute (i.e. 'color:'). I have added the following code to my 'media.phtml' file:

<div class="color-option">
<?php echo $_product->getAttributeText("color"); ?>
</div>

Which displays the value. But how do I get it to also show the label?

Best Answer

$_product->getResource()->getAttribute('color')->getStoreLabel();

Copied from StackOverflow.

Related Topic