You are here:  » Category in search form


Category in search form

Submitted by oneilus on Sun, 2013-11-17 14:30 in

Hi David,
I wanted to add a category drop down menu to my search form, I followed this old post: http://www.pricetapestry.com/node/1478

But does not work, the parameter is passing in search url eg:
search.php?log=1&q=jeans&category=Clothing

but returns 0 results even that i have products name jeans in a Clothing category.
I did a test for only category search.php?log=1&q&category=Clothing
shows all products in Clothing category..
So looks like search.php can't read the 2 parameters in the URL.
maybe I have to change also the SQL query ?

Submitted by support on Mon, 2013-11-18 09:29

Hello oneilus,

No changes required to search.php with the latest distribution, and in your modifications to html/searchform.php based on node 1478 simply REPLACE:

    <select name='category'>

...with:

    <select name='categoryFilter'>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by oneilus on Mon, 2013-11-18 15:29

Hi David,

All good :)
Thanks!