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
    Commented Apr 12, 2016 at 11:19
  • yes, exactly @Arunendra Commented Apr 12, 2016 at 11:28

1 Answer 1


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 and acknowledge you have read our privacy policy.

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