Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Add drop down attribute in product view page ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 292
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: