Domanda

I have created multiselect custom attribute for product. See https://prnt.sc/sp7wgn I want to display the selected option value on frontend using phtml file. How can i do that??

È stato utile?

Soluzione

Need to check if attribute settings are correct set or not

https://i.stack.imgur.com/0YKqI.png

template code

$attribute_string = $_product->getResource()->getAttribute('attribute')->getFrontend()->getValue($_product);

$attribute_array = explode(', ', $attribute_string);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top