In Magento it is possible to access a product’s attributes with a simple getter method. Let’s get the attribute
<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>
This works as long as
<?php echo $_product->getAttributeText('yourattributecode')?>
test
:<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>
This works as long as
test
is an attribute of type ‘text’.
If the attribute is a dropdown, the method will just return the id of
the selected option. To get the dropdown text, you need to call another
method:--<?php echo $_product->getAttributeText('yourattributecode')?>
No comments:
Post a Comment