X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Hidden Categories (https://forum.x-cart.com/showthread.php?t=8276)

ScrapOrchard 06-29-2011 04:21 PM

Re: Hidden Categories
 
Thank you, Darren.

I was able to locate the exact code in the func.category.php file, however, changing it does not seem to have corrected the problem for me. Sorry. :(

mrerotic 06-29-2011 08:18 PM

Re: Hidden Categories
 
Yes sorry for the delay here. Edit exactly what he said and then clear your sites cache. By going to http://www.yoursite.com/cleanup.php then see if it works properly.

ScrapOrchard 06-30-2011 10:40 AM

Re: Hidden Categories
 
oooooo... let me try that (I have to wait until I get home and can access the files).

ScrapOrchard 06-30-2011 12:19 PM

Re: Hidden Categories
 
Hrm. That didn't seem to work either. I am going to rework the mod, just to make sure I did not accidentally overlook any of the steps and then try your suggestions again.

Thank you both for trying to help me out!

carlisleglass 07-04-2011 03:01 AM

Re: Hidden Categories
 
I did change 2 other lines:

Code:

      $search_condition[] = "node.avail = 'Y'";
to
Code:

      $search_condition[] = "(node.avail = 'Y' OR node.avail = 'H')";

and ...
Code:

$search_condition[] = "c.avail = 'Y'";
to
Code:

$search_condition[] = "(c.avail = 'Y' OR c.avail = 'H')";

Those might of made it work as well.

ScrapOrchard 07-07-2011 12:57 PM

Re: Hidden Categories
 
Quote:

Originally Posted by carlisleglass
I did change 2 other lines:

Code:

      $search_condition[] = "node.avail = 'Y'";
to
Code:

      $search_condition[] = "(node.avail = 'Y' OR node.avail = 'H')";

and ...
Code:

$search_condition[] = "c.avail = 'Y'";
to
Code:

$search_condition[] = "(c.avail = 'Y' OR c.avail = 'H')";

Those might of made it work as well.


Was this still in the func.category.php file?

mrerotic 07-07-2011 08:15 PM

Re: Hidden Categories
 
yes thats correct.

mrerotic 07-07-2011 08:27 PM

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!

ScrapOrchard 07-11-2011 06:58 AM

Re: Hidden Categories
 
These new instructions for func.category.php (replacing the previous edits for the file) along with the instructions from the previous post works for 4.3.2! Thank you so much!!!

mrerotic 07-11-2011 12:19 PM

Re: Hidden Categories
 
Your welcome. Sorry for the long delay to get this resolved!! :) :)


All times are GMT -8. The time now is 12:50 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.