سؤال

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??

هل كانت مفيدة؟

المحلول

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);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top