View Single Post
  #7  
Old 04-25-2005, 06:40 PM
 
mustang mustang is offline
 

eXpert
  
Join Date: Nov 2003
Location: US
Posts: 210
 

Default

It think I've got this figured out. It appears to be working...at least for me it is.

If anyone else wants to exclude all products in disabled categories from appearing in the search results try this:

This is in XC Gold 4.0.12.

Locate the following code at around line 220 in include/search.php:
Code:
$search_condition .= " AND $sql_tbl[products_categories].productid=$sql_tbl[products].productid AND $sql_tbl[products_categories].categoryid = $sql_tbl[categories].categoryid"; if($current_area == 'C') { $search_condition .= " AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."')"; }

And change to this:
Code:
$search_condition .= " AND $sql_tbl[products_categories].productid=$sql_tbl[products].productid AND $sql_tbl[products_categories].categoryid = $sql_tbl[categories].categoryid"; if($current_area == 'C') { $search_condition .= " AND $sql_tbl[categories].avail = 'Y' AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."')"; }
__________________
X-Cart Gold 4.2.3
-----
PHP 5.2.17 | MySQL 5.1.52
Reply With Quote