Hello Readers, In this blog i am going to show you "How to add drop down attribute in product view & list page.
Lets Suppose, If you want to display the color and size attributes of the configurable product , then you can Use following code to get attribute in view & list page.
Here is example of “Size” -> Attribute
Path: app/design/theme/template/catalog/product/view.phtml and paste the following content in view.phtml.
<?php echo $_product->getResource()->getAttribute('Size')->getFrontend()->getValue($_product) ?>
For Product list page
Path: app/design/theme/template/catalog/product/view.phtml and paste the following content in list.phtml.
<?php echo $_product->getResource()->getAttribute('Size')->getFrontend()->getValue($_product) ?>
0 Comment(s)