View Single Post
  #88  
Old 07-07-2011, 08:27 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Hidden Categories

Ok everyone for 4.2.x func.category.php should have the following edits ONLY:

Find the following:
Code:
if (empty($mexists)) {

Below it change this:
Code:
$subcat_count = func_query_first_cell.........

To this:
Code:
$subcat_count = func_query_first_cell("SELECT COUNT(*) FROM $sql_tbl[categories] USE INDEX (pa) WHERE $sql_tbl[categories].categoryid_path LIKE '$path' AND ($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail = 'H')");

Then find:
Code:
} elseif (!empty($lvl)) {

Below it change this:
Code:
$subcat_count = func_query_hash..............

To this:
Code:
$subcat_count = func_query_hash("SELECT COUNT(*) as subcategory_count, IFNULL($sql_tbl[category_memberships].membershipid, 0) as membershipid FROM $sql_tbl[categories] USE INDEX (pa) LEFT JOIN $sql_tbl[category_memberships] ON $sql_tbl[category_memberships].categoryid = $sql_tbl[categories].categoryid WHERE $sql_tbl[categories].categoryid_path LIKE '$path' AND ($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail = 'H') GROUP BY $sql_tbl[category_memberships].membershipid", "membershipid", false, true);

Then find:
Code:
$search_condition_2 = ""; if ($current_area == "C" || $current_area == "B") {

Below it change this:
Code:
$search_condition_2 = " AND...");

To this:
Code:
$search_condition_2 = " AND ($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail = 'H')";

THESE ARE THE ONLY EDITS THAT SHOULD HAVE $sql_tbl[categories].avail = 'H' in them. If they exist anywhere else, please remove it from the query. Let me know, this should take care of everyones problems.
After these edits are completed remove your stores cache for templates by going to http://www.yourstore.com/cleanup.php and then check your site to see if everything is working properly now!
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote