Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Excluding category from search

Excluding category from search

Locked

Views: 998

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
12 Jan 2009, 9:19 PM
#1
kgeoffrey avatar

kgeoffrey

New Zenner

Join Date:
Mar 2007
Posts:
22
Plugin Contributions:
0

Excluding category from search

Hi there,

What is the best way to exclude all the products in a given category from the search results? I'm using Zencart 1.3.0.1

Thanks!

12 Jan 2009, 11:42 PM
#3
kgeoffrey avatar

kgeoffrey

New Zenner

Join Date:
Mar 2007
Posts:
22
Plugin Contributions:
0

Re: Excluding category from search

Excellent! Thank you so much. Worked like a charm.

I changed

               AND p2c.categories_id = c.categories_id ";

to

 
               AND p2c.categories_id = c.categories_id
               AND (c.categories_id < 9 OR c.categories_id > 10) ";

to exclude categories 9 and 10. I don't know if that was the "right" way to do it, but it worked.

Thanks again!

12 Jan 2009, 11:46 PM
#4
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Excluding category from search

You can also try

AND c.categories_id <> 9 AND c.categories_id <> 10

samething