magento2.1 dropdown attribute list.phtml
-
15-02-2021 - |
Question
How to get a dropdown attribute value on the category page, i set the show in listing to yes and added this attribute to product. any suggestion?
La solution
This code can help you:
$attr = $_product->getResource()->getAttribute('your_attribute_code')->getFrontend()->getValue($_product);
please let me know if any issue you have
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange