osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

CSS Menu

This is a discussion on CSS Menu within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This is a great contribution, the only css menu contrib that I actually liked. However, I noticed something disturbing about ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 02-06-2007, 06:11 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,527
Thanks: 76
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post CSS Menu

This is a great contribution, the only css menu contrib that I actually liked. However, I noticed something disturbing about it. If you install Chemo's amazing queries debug contribution, to find out how many mysql queries are being made in each page refresh (on each page of your entire site, thus lowering the page load speed) you will notice that the queries, with this css menu installed, are well over 2000! (Well, I noticed that anyway, you might be lucky and have less or unlucky and have more). Just to give perspective, the stock osc files and original category menu will give you about 100 queries, at the most, and that is a BIG difference in page loading times. And if you are running off of a shared server, that is just a big no-no. This will bog down your server if you get a lot of page hits, because on each page, there are thousands of queries being performed, just for the menu. They do not cost a lot of time, because even with the menu taking up about 2500 queries, my index.php was still loading up in about 4 seconds. However, I got it down to about 1 second by adding some little fixes to the categories_css.php file. And if you add up all the seconds a potential customer will save by you doing this, from arriving on your page and potentially making a purchase (assuming the slow page loads doesn't make him leave) it will be an enormous improvement.


If you want to see what it should be, search the contributions for "queries debug" and install it. Check at the very bottom of the page on your index.php and see how many queries you have. Then go back to the stock osc category menu in catalog/includes/column_left.php by changing categories_css.php with categories.php wherever it shows up. Then check again, and you will see what I mean (of course, if for some reason this strange occurance doesn't happen to you, consider yourself lucky!).


Now, I am NOT a php programmer, I understand the very basics of it only. I have, though, done a VERY rough edit of the categories_css.php file to remove some of the "counts" that were being queried. It appeared that even though in the Admin-> Configurations-> Category Count, I had it turned off, this menu was trying to still count all of the different products in the categories. So by commenting out some lines, I was able to get the queries reduced to about 10% of the original. Now, this works for me, I don't know if it will for you, so please backup before you try this. And unless you know exactly what you're doing, don't comment out any more lines in the file! This might delete the ability of the menu to display subcategories, or might stop it from working altogether. So, I have included the most updated css menu contribution, released on Nov. 20, 2006, except for the patch below by micr, so if you need that, you will have to do that separately.

DIRECTIONS:

1. IF YOU HAVE CSS MENU ALREADY INSTALLED:

Backup your catalog/includes/boxes/categories_css.php and replace it with the one I have packaged with the original contribution. Look in my archive for a folder called "my file". You will have to change the style to match what you already have, but you can do that by just highlighting the style section of your file and replacing the new one; nothing there has changed so you will not run into problems.

2. IF YOU DON'T HAVE CSS MENU INSTALLED YET:

Unzip my archive, and you will see a "my file" folder. That includes my edited file, don't worry about that yet. You will also see an archive called css_menu_0_3.zip. unzip that and install it like normal. And then go my "my file" and replace catalog/includes/boxes/categories_css.php with mine and change the style section to match your site accordingly.



Now, this is just a hack of this contribution to get it to load faster. I'm sure someone with better php skills can make this look nicer in the future, so here's looking forward to someone stepping up and making this contribution better. Direct any thanks to the guys who have made this contribution and worked on it, they deserve it.

Again, if you want to see what type of difference we're talking about, go back to your original categories.php menu like I mentioned above and see how many database queries you have with that one. If it's a lot lower, then try what I said above and hopefully that will help your site out a lot. Good luck.

More...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 05-01-2007, 03:40 PM
New Member
 
Join Date: Apr 2007
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
php4ever is on a distinguished road
Default Re: CSS Menu

where is this added to the BTS template. I see no documentation here or in the contrib forum.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 05-06-2007, 08:41 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,527
Thanks: 76
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: CSS Menu

This mod is not for osCMax, it is for standard osCommerce, that is why you will not find any mention of BTS, as that is not in standard osCommerce.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

« CSS Menu | CSS Menu »
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
CSS Menu michael_s New osCommerce Contributions 2 02-04-2007 05:27 AM
cool menu vs dhtml menu Lara Croft osCMax v2 Features Discussion 3 01-17-2007 11:38 AM
Adding cool menu and keeping the catorory menu??? Kyle_Bassett osCMax v2 Customization/Mods 0 10-18-2005 09:17 AM
Menu question bibleman osCMax v1.7 Discussion 0 06-24-2005 02:30 PM
making the catalog menu same style as admin menu starchild osCommerce 2.2 Modification Help 0 06-01-2003 04:42 AM


All times are GMT -8. The time now is 12:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax