/ Published in: PHP

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
