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
Need to check if attribute settings are correct set or not
template code
$attribute_string = $_product->getResource()->getAttribute('attribute')->getFrontend()->getValue($_product);
$attribute_array = explode(', ', $attribute_string);
-
-
Can you tell me how can i get the url for the same . I need attribute value url too along with the name– NafsssCommented May 28, 2020 at 7:48
-