View Full Version : category levels

04-08-2012, 04:42 AM
Hi - Is there a way to show category level 1 and category level 2 in the category box as soon as the front page is loaded? At the moment it shows level 1 and the customer has to click on one to show the next level.

04-08-2012, 08:41 AM
Or switch to the SEO-Popout menu and they just have to mouse-over.

But yes you can do whatever you want with the display, just code it up. That is the beauty of open source and somebody has already done most of the work for you:
Expand category tree by default on left infobox? - osCommerce Support Forum (http://forums.oscommerce.com/topic/47384-expand-category-tree-by-default-on-left-infobox/page__view__findpost__p__222200)

04-09-2012, 10:36 AM
I found that in categories.php around line 140 - " $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" - changing the 0 to a parent id will produce exactly the list I want. Since I have only 4 parent ids I created 4 new infoboxes - categories_A.php, etc and added them to the admin infobox section, and tried to make them load one after the other. Followed the instructions in Wiki, but none will load. If I change categories_A.php (or B,C,D) to categories.php then they load perfectly! What have I missed?

04-09-2012, 12:07 PM
Solved the loading problem - I put the filenames in admin as categories_A.php instead of categories_A! Now the problem is that only 1 at a time will work!