Hi all, I really like this menu contribution; however, I noticed a problem with the database query counts that this menu causes, and I thought I would share it. I probably should have posted it here first, but I went ahead and posted it to the contribution page:
http://www.oscommerce.com/community/contributions,4589
If it doesn't affect you, then you don't have to worry, but if I had the problem, then I'm sure that a lot of you might also have it without realizing it.
The category menu makes a certain amount of database queries to count products, get product titles, etc, but I found an unusual number of db queries being made (I had over 2500) on each and every page refresh! So, I commented out some lines on the menu, and got it down to about 250, which is still high but not nearly as high as before; page loads are also down by about 75%. (Just so you know, if you install the original oscommerce stock files, straight from the zip file, your pages will have about 100 queries or less. Certain mods will increase that). If you are on a shared server, you MUST take a look at this, because this can cause problems to your site, as well as others on the server(i.e. hosting companies like ipowerweb, who throttle the db queries, also called "max questions"). A company like that will actually suspend your account if you take too many resources away from others.
So, after the commented code is uploaded, the menu functions perfectly normal on my site, nothing has been changed, no links broken, everything looks just like it did before. However, a few things to take note of: It's a big hit to your page loading time to have "category counts" turned on in your admin->configuration, so turn that off. Also, don't have the "show products" option in the menu turned on, because that slows everything down as well. (These are just my opinions, if you like it on, keep it on). So, everyone who has this mod installed, go to the contribution page and search for "queries debug" and install it. It will tell you how many db queries you are using on each page refresh, as well as help you optimizing your page. Then, install the fix that I uploaded, and see if it makes a big difference. Hopefully, you will all see a nice improvement like I did. All credit to the creators of this and Chemo for his queries debug mod.