After installing the mod, I noticed that there were a few places where my hidden categories were still showing (Site Map, Customers who bought this product also purchased...).
I haven't seen any posts for solutions to hiding in Site Map & Customers who bought... sections, so I thought I'd post my ideas. I use Zen-Cart 1.3.7 too, BTW.
Here's how I stopped the categories from showing in Site Map & individual products from w/in a hidden category from being shown in Customers who bought...
Customers who bought...
go to: /includes/classes/db/mysql/define_queries.php
and find the section that starts w/ DEFINE('SQL_ALSO_PURCHASED' and make it look like this:
Code:
DEFINE('SQL_ALSO_PURCHASED', "select p.products_id, p.products_image
from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, "
. TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p LEFT JOIN "
. TABLE_HIDE_CATEGORIES . " h ON (p.master_categories_id = h.categories_id)
where (h.visibility_status < 2 OR h.visibility_status IS NULL)
and opa.products_id = '%s'
and opa.orders_id = opb.orders_id
and opb.products_id != '%s'
and opb.products_id = p.products_id
and opb.orders_id = o.orders_id
and p.products_status = 1
group by p.products_id
order by o.date_purchased desc
limit " . MAX_DISPLAY_ALSO_PURCHASED);
Now for the
Site Map
go to: /includes/classes/site_map.php
On or around line 37 (depending if you've edited this file before) & make sure it looks like this:
Code:
$categories_query = "select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c LEFT JOIN "
. TABLE_HIDE_CATEGORIES . " h ON (c.categories_id = h.categories_id), "
. TABLE_CATEGORIES_DESCRIPTION . " cd
where (h.visibility_status < 2 OR h.visibility_status IS NULL)
and c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and c.categories_status != '0'
order by c.parent_id, c.sort_order, cd.categories_name";
These changes *should* work. Mileage may vary. Make a copy of these files & backup before editing them in case something looks screwy afterwords.
I hope this is useful to someone out there.
Bookmarks