Hi,
I've recently been setting up my store with a css dropdown menu, tree menu categories side box and hide categories. I got the dropdown menu to work by copying the sql query from the hide categories site map modification and pasting it into the categories_ul_generator.php file.
Now I am trying to do a similar thing to the includes/modules/treemenu.php file to get the treemenu to hide categories.
The original treemenu query looks like this:
function zen_treemenu_get_catalog($id_parent, $position, $str_cPath, $first_element='true'){
global $tree_menu_items, $db, $tree_menu_noscript;
$groups_cat = $db->Execute("select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.parent_id = '" . (int)$id_parent . "'
and c.categories_id = cd.categories_id
and cd.language_id='" . (int)$_SESSION['languages_id'] . "'
and c.categories_status= '1'
order by sort_order, cd.categories_name",
'', false, 150);
This appears to be the query that needs to be rewritten.
...but there are a couple other places that may to be fixed as well:
// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id
from " . TABLE_CATEGORIES . "
where categories_status=1 limit 1");
...and:
function zen_has_products_in_category_and_subcategories($id_categories) {
global $db;
if (!TREEMENU_SKIP_EMPTY) return true;
$id_cateqories_products = $db->Execute("select count(*) as total
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$id_categories . "'
and p.products_status = '1'");
Anyone know this?
A.D.