Guest Posted January 4, 2009 Share Posted January 4, 2009 Hi All, I would like to thank you in advance for any help or guidance you can give me with this issue. Heres the rundown of what I am trying to accomplish: 1. For example... I have 4 main categories when my site loads - ____Menu______ Category1 Category2 Category3 Category4 2. When A user Clicks on a category I want to only show the Current Selected Category and all its sub categories. So if a user was to click on Category2 the nav above would now look like this: _____Menu_____ Category2 --Sub1 --Sub2 --Sub3 Can anyone point me in the right direction. Thanks a million, -Joe Link to comment Share on other sites More sharing options...
voided Posted January 4, 2009 Share Posted January 4, 2009 in catalog/includes/boxes/categories.php find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); change to: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $current_categories_id . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); i think thats all that was needed... let me know if it works for you. Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix Link to comment Share on other sites More sharing options...
Guest Posted January 9, 2009 Share Posted January 9, 2009 in catalog/includes/boxes/categories.php find: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); change to: $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $current_categories_id . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); i think thats all that was needed... let me know if it works for you. Hi Voided, Thanks for your help and reply. It's very apprecated. I replaced the line above in the categories PHP but it still gives me the same thing. Any other suggestions? I appreciate all your help. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.