If you want to show a drop-down attribute value on product view page & product listing page in Magneto then follow below code.
Suppose, your attribute code is “color”
go to current theme/template/catalog/product/view.phtml
then edit view.phtml and add :
<?php echo $_product->getResource()->getAttribute('color')->getFrontend()->getValue($_product) ?>
For Product List/grid page
go to current theme/template/catalog/product/list.phtml
then edit list.phtml and add following code :
<?php echo $_product->getResource()->getAttribute('color')->getFrontend()->getValue($_product) ?>
0 Comment(s)