Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Dynamic Left Menu Based on category


Recommended Posts

Hey everyone.


I'm starting to develop a very big OSC shop, that will probably total over 5000 skus.

Because of the amount of products, and categories, the left navigation could get very long and wide with all the sub sub categories.


What I'm looking for help in developing, is to have navigation along the underside of the header (kindof like amazon.com's tabs) and when you click on, lets say the TOYS tab, then the left nav changes to reflect all subcategories of TOYS, and visa-versa with all other Main Categories. So the main categories will be by default on the left nav and in the new horizontal header nav bars, but when you select a main category, the left nav switches to ONLY the sub categories of the main one you just clicked on.

You know how default OSC does the tree menu system.. like the subs display under the main.. Its kinda like that, but the main categories are no longer displayed on the left when you are in that category.


The main point of doing it this way is to keep the left menu size down.


I hope I got my point accross there... I'll be very active in the development of this mod if it does or does not exist - but i'm sure I'll need the help from some of the great OSC members we have on here. If this doesnt exist, then I'll share all source with everybody and once we get it stable, I'll (we) well release it, cause I think that others could definately use this.


Thanks in advance to all!! B)


Link to comment
Share on other sites

Around line 73 of includes/boxes/categories.php, change "where c.parent_id = '0'" to be something like where c.parent_id = '" . (int)$category_branch . "'


You will also have to define $category_branch as the category_id somewhere. Presumably at the same time as $current_category_id is being set in includes/application_top.php would be good. You might also have to adjust the cPath parsing part of categories.php as well (o.w. it will show the categories twice). I think that adding


after the reset($cPath_array); around line 95 would do it.


JulieCSM and Burt have been working on tab systems.




Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...