View Single Post
  #80  
Old 06-29-2011, 04:12 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: Hidden Categories

Quote:
Originally Posted by gatordp
I followed your steps exactly. However, it doesn't seem to be working. When I check a category as "hidden" in admin, it deactivates it instead and returns a 404 error page when I try to visit the category URL. Then if I check "enable" it works fine again.

I am using 4.2.2 -- any thoughts on what went wrong?

I am using 4.4.3 and was having the same problem but I have found out the error.

Look in 'include/func/func.category.php' for :

Code:
$search_condition = "AND $sql_tbl[categories].avail='Y' AND ($sql_tbl[category_memberships].membershipid = '".$user_account["membershipid"]."' OR $sql_tbl[category_memberships].membershipid IS NULL)";

and change to ...

Code:
$search_condition = "AND ($sql_tbl[categories].avail='Y' OR $sql_tbl[categories].avail='H') AND ($sql_tbl[category_memberships].membershipid = '".$user_account["membershipid"]."' OR $sql_tbl[category_memberships].membershipid IS NULL)";

Hopefully its the same coding within v4.2
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote