/ Published in: PHP
![](/img/icon_sav.png?v3)
Displays the attribute label and value by using the attribute code.
This works on the Product Detail page in Magento.
This works on the Product Detail page in Magento.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if($_product->getData('attribute_code')) : ?> <?php echo $_product->getResource()->getAttribute('attribute_code')->getStoreLabel(); ?>: <?php echo $this->htmlEscape($_product->getData('attribute_code')); ?> <?php endif; ?>
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)