cancel
Showing results for 
Search instead for 
Did you mean: 

Parse multiselect custom options array

SOLVED

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 ACCEPTED SOLUTION

Accepted Solutions

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.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

View solution in original post

1 REPLY 1

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.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now