Posted By

axertion on 02/01/12


Tagged

attributes magento


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

WGenie


Get product attribute label & value in Magento


 / Published in: PHP
 

Displays the attribute label and value by using the attribute code.

This works on the Product Detail page in Magento.

  1. <?php if($_product->getData('attribute_code')) : ?>
  2. <?php echo $_product->getResource()->getAttribute('attribute_code')->getStoreLabel(); ?>: <?php echo $this->htmlEscape($_product->getData('attribute_code')); ?>
  3. <?php endif; ?>

Report this snippet  

You need to login to post a comment.