I have created one drop down attribute, I followed this tutorial to get selected values from that attribute. I successfully get the result, But I want to render whole drop down.What I do for achieve this?

  • Do you want to show all drop down option list ?
    – Arunendra
    Apr 12 '16 at 11:19
  • yes, exactly @Arunendra Apr 12 '16 at 11:28

On Product Detail Page or on Product List Page you can get attribute (color replace with yours) drop down value using following code:

$attr = $_product->getResource()->getAttribute('color')->getOptions(); 
foreach ($attr as $attrColor) {
    echo $attrColor->getValue();
    echo '<br>';
    echo $attrColor->getLabel(); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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