cancel
Showing results for 
Search instead for 
Did you mean: 

Parse multiselect custom options array

Parse multiselect custom options array

I'm building a book shop store.

 

I created an Author custom attribute (multiselect) and I'd like to render it as a link to advanced search.

 

The following code works if I select only one value, but if I select more of one value I see array.

 

 

<a href="/catalogsearch/advanced/result/?author=<?php echo $_product->getData('author') ?>"><?php echo $_product->getAttributeText('author') ?></a>

 How can I adapt it for multiselect values?

1 REPLY

Re: Parse multiselect custom options array

@d_fittipaldi

 

This may be help you, If you make the array of selected value into one string and then pass in URL.

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html