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 Answer 1

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, 2020 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, 2020 at 7:48
  • any idea???????????
    – Nafsss
    May 28, 2020 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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