You are here:  » Filter on Category/Brand/Merchant Page Doesn't Work


Filter on Category/Brand/Merchant Page Doesn't Work

Submitted by bat on Thu, 2022-02-10 16:40 in

Hi David,
I've noticed on my site {link saved} that the filter doesn't work when using it on a category/brand/merchant page.
It works if you use the search box to enter a query then filter the results, but does not return any products if you try filtering on a category/brand/merchant results page. The filter options are present but they all return no products.
I'm using the dropdown filter.
Please can you advise.

Thanks
Bat

Submitted by support on Fri, 2022-02-11 08:34

Hi,

That sounds like the filter form is not submitting explicitly to search.php. If that's the case look for the opening tag of the filter form and add an action attribute so that you have;

<form action='search.php'>

That should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2022-02-11 14:12

Thanks David. Would this be in html/searchfilters.php or search.php?

In html/searchfilters.php, I have this code at the beginning of the filter
print "<form method='GET' action='".$config_baseHREF."search.php'>";

Submitted by support on Fri, 2022-02-11 14:43

That should be OK then;

In that case, from a merchant A-Z results page for example; after applying a filter what is URL compared to previously?

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2022-02-11 15:32

Hi David,
I don't have one on my Merchant A-Z.
So I've just analysed it further, and it looks like:
If i click on a merchant, the brand, category and price filter don't work.

If I click on a Brand, the merchant filter doesn't work but the category and brand filter do.

If I click on a Category, the merchant, brand and price filter doesn't work.

I think something has gone wrong somewhere in the code as I tried a price filter on a brand page and then it took me to all products (regardless of brand) in that price bracket. I tried the merchant filter and it changed to showing all products (regardless of brand) from that merchant. It's like it's taken the original selection, say a brand, and then made it a search query upon submitting the filter.

e.g. {link saved}
After applying merchant filter: {link saved}

Submitted by support on Fri, 2022-02-11 15:50

Hi,

It looks like the prefix is being excluded from the query upon form submission - please could you email me the relevant html/searchfilters.php and I'll check that out for you...

Cheers,
David.
--
PriceTapestry.com