Zen Cart Logo
Forums / General Questions / Advanced Search questions

Advanced Search questions

Views: 491

Results 1 to 3 of 3
24 Mar 2011, 6:16 PM
#1
nrose avatar

nrose

New Zenner

Join Date:
Mar 2010
Posts:
1
Plugin Contributions:
0

Advanced Search questions

We have the Advanced Search Plus installed (latest version), along with the 1.3.9h Zen Cart. URL: https://www.madbomber.com/store

We have disabled some categories, but the products in those categories are not disabled. Is there a way to have the search NOT include those products of the disabled categories? Otherwise, it's pretty tedious to disable all the products and categories.

Thanks!

15 Apr 2011, 9:42 PM
#2
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Advanced Search questions

I'm experiencing the same issue. I've installed the Hidden Category mod (which allows you to hide certain categories and their products) but because I'm using the Advanced Search Plus mod, it won't hide the hidden categories during a search.

I've narrowed down the fix down to needing to modify the advanced_search_categories.php in the Advanced Search Plus Mod but I'm having problems merging the code from Hidden Categories into said file.

I don't know if this is the type of solution you're looking for but I'll let you know if I can get it to work.

15 Apr 2011, 10:09 PM
#3
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Advanced Search questions

That didn't take nearly as long as I thought it would. This is what I did to hide a category from Advanced Search Plus.

I downloaded, **carefully merged **and installed both the Advanced Search Plus and Hide Categories modules.

Then (after I hid my category per the instructions in the Hide Categories read me) I went into includes/modules/my_custom_template/advanced_search_categories.php and replaced

$from_str_cat = " from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES . " c ";
$where_str_cat = " where cd.categories_id = c.categories_id and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'";

on or about line 47 with

$from_str_cat = " from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd," . TABLE_HIDE_CATEGORIES . " cde ";
$where_str_cat = " where c.categories_id=cd.categories_id and c.categories_id=cde.categories_id and c.parent_id= '0' and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status='1' and cde.visibility_status < 2 OR cde.visibility_status IS NULL " ;

My search results no longer include the hidden categories.