You are here:  » Additional SearchFilter Lost if click sort


Additional SearchFilter Lost if click sort

Submitted by marco.saiu on Sat, 2018-01-13 00:57 in

Hello David,

i add some additiona filters but if i filters and next click for sort price lost all additional filters.

Not have issue when i filters per merchant,category or brand.

Have idea?

Thanks,
Marco Saiu

Submitted by support on Sat, 2018-01-13 12:22

Hello Marco,

Using "customFilter" as an example, to ensure that custom filters are propagated through sort and pagination, edit search.php and look for the following code beginning at line 451:

      if ($brandFilter)
      {
        $sortHREF .= "brandFilter=".urlencode($brandFilter)."&";
      }

...and REPLACE with:

      if ($brandFilter)
      {
        $sortHREF .= "brandFilter=".urlencode($brandFilter)."&";
      }
      if ($customFilter)
      {
        $sortHREF .= "customFilter=".urlencode($customFilter)."&";
      }

And then the following code beginning at line 573:

    if ($brandFilter)
    {
      $sort .= "&brandFilter=".urlencode($brandFilter);
    }

...and REPLACE with:

    if ($brandFilter)
    {
      $sort .= "&brandFilter=".urlencode($brandFilter);
    }
    if ($customFilter)
    {
      $sort .= "&customFilter=".urlencode($customFilter);
    }

Cheers,
David.
--
PriceTapestry.com