You are here:  » Order by dropdown on multi list


Order by dropdown on multi list

Submitted by marco on Mon, 2018-02-05 14:44 in

Hello,

I am trying to adjust the order by to a dropdown list as in:
https://www.pricetapestry.com/node/4173#comment-16815

Since I am using the sidebar filters multi list the hidden fields have to contain the filter array.

How can this be adjusted?

Best,
Marco

Submitted by support on Mon, 2018-02-05 15:10

Hello Marco,

Example from node 4173 for brandFilter:

       $sortForm .= "<input type='hidden' name='brandFilter' value='".htmlentities($brandFilter,ENT_QUOTES,$config_charset)."' />";

...equivalent for multi-select (array) version:

       foreach($brandFilter as $v)
       {
         $sortForm .= "<input type='hidden' name='brandFilter[]' value='".htmlentities($v,ENT_QUOTES,$config_charset)."' />";
       }

Cheers,
David.
--
PriceTapestry.com

Submitted by marco on Mon, 2018-02-05 17:21

Thanks!