I want to display product attribute in product page left column, when I try this code :

echo $_product->getAttributeText('your_attribute_code');

It is returning fatal error. Can you guide me how to solve this?


1 Answer 1


You need to replace from $this->getProduct() to Mage::registry('current_product')

For exp. I am calling product description attribute here replace it with yours :

 <?php $_description = Mage::registry('current_product')->getDescription(); ?>
<?php if ($_description): ?>
    <h2><?php echo $this->__('Details') ?></h2>
    <div class="std">
        <?php echo $this->helper('catalog/output')->productAttribute(Mage::registry('current_product'), $_description, 'description') ?>
<?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.