1

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

1

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);
3
  • Thanx this worked for me
    – Nafsss
    May 28 '20 at 7:40
  • Can you tell me how can i get the url for the same . I need attribute value url too along with the name
    – Nafsss
    May 28 '20 at 7:48
  • any idea???????????
    – Nafsss
    May 28 '20 at 8:01

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.