Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

coolMenu


Keyser Soze

Recommended Posts

Only in Mac Netscape 7.2, the Categories box is wider than it should be. (It's not shrinking to the size of the overlayed menu)

 

Unlike some of the code posted around here, I have this code controlling the height of my Categories box:

 

catalog/includes/boxes/coolmenu.php:

 

<?php
// get height of menu
$height_query = tep_db_query("select count(*) as count from " . TABLE_CATEGORIES . " where parent_id = '0'");
$heightarray = tep_db_fetch_array($height_query);
$height =($heightarray['count'] * 29.75);

 

Like what you see above, is there a similar code to control the width for Netscape? (Like a $width=)

Again, the width of the category box is working fine in Mac I.E. 5.2 and Safari

 

If you are using Mac Net. 7.2, you can see the problem here: http://www.stitchpiecenpurl.com/catalog/

 

Thanks for your help!

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Only in Mac Netscape 7.2, the Categories box is wider than it should be. (It's not shrinking to the size of the overlayed menu)

 

Unlike some of the code posted around here, I have this code controlling the height of my Categories box:

 

catalog/includes/boxes/coolmenu.php:

 

<?php
// get height of menu
$height_query = tep_db_query("select count(*) as count from " . TABLE_CATEGORIES . " where parent_id = '0'");
$heightarray = tep_db_fetch_array($height_query);
$height =($heightarray['count'] * 29.75);

 

Like what you see above, is there a similar code to control the width for Netscape? (Like a $width=)

Again, the width of the category box is working fine in Mac I.E. 5.2 and Safari

 

If you are using Mac Net. 7.2, you can see the problem here: http://www.stitchpiecenpurl.com/catalog/

 

Thanks for your help!

 

The width of the menu items is set in includes/coolmenu.php. I'm not sure if you are referring to the menu items or the table itself

 

		oCMenu.level[0].width=130
	oCMenu.level[0].height=25

 

sounds more like a browser specific (CSS maybe) problem. I don't use Macs so i can't really help you there

Link to comment
Share on other sites

Thanks,

 

I was reading some threads in this topic and made me want to question it before I attempted the install.

 

 

I've been running both SEO URLS and coolmenu for some time without any problems, except for errors caused by my own experiments.

 

As always, backup everything just in case something does get messed up.

Link to comment
Share on other sites

Hi I have a small problem with coolmenu. I think it looks great but just cant seem to get it to work properly.

 

on the index page in looks fine (17" monitor 1280*1024 res) maybe a little to close the Manufactures box

 

Coolmenu1.JPG

 

 

 

but when I use the menu to go down a couple of levels it ends up looking like this

 

 

Coolmenu.JPG

 

When I go to http://www.geraeteland.de/shop/catalog/index.php that doesnt happen.

 

I understand (I maybe wrong, I often am :blink: ) thats its written so that if a viewer doesnt have java enabled\installed then it will default to the original menu?

 

Is there away to stop the original menu from expanding when I go down a the menu a level or 2?

Link to comment
Share on other sites

Hi I have a small problem with coolmenu. I think it looks great but just cant seem to get it to work properly.

 

on the index page in looks fine (17" monitor 1280*1024 res) maybe a little to close the Manufactures box

 

Coolmenu1.JPG

but when I use the menu to go down a couple of levels it ends up looking like this

Coolmenu.JPG

 

When I go to http://www.geraeteland.de/shop/catalog/index.php that doesnt happen.

 

I understand (I maybe wrong, I often am :blink: ) thats its written so that if a viewer doesnt have java enabled\installed then it will default to the original menu?

 

Is there away to stop the original menu from expanding when I go down a the menu a level or 2?

 

Is this happening on the no-javascript version of it or is this when you have javascript turned on? Also, mind posting a link?

Link to comment
Share on other sites

I've got 1020 Categories (yes, a thousand...) and I wanted to show the count of items on each category. However, the script takes 8 to 10 seconds to run with this feature... Has anyone optimized the SQLs for this purpose?

 

Thank you

Marcello Sales

Software Systems Architect

Computer Science

Link to comment
Share on other sites

Hi Get-Wireless.

 

Unless I'm mistaken, I thought the original categories box was created using the <NO SCRIPT> section of the javascript.

 

If I'm right, then you shouldn't be running the original categories section and should actually have a blank box with a large transparent image in it.

 

I would double check your installation.

 

Mark.

Link to comment
Share on other sites

Hi Get-Wireless.

 

Unless I'm mistaken, I thought the original categories box was created using the <NO SCRIPT> section of the javascript.

 

If I'm right, then you shouldn't be running the original categories section and should actually have a blank box with a large transparent image in it.

 

I would double check your installation.

 

Mark.

 

I second that. If the javascript menu is showing on top of the original menu, something is not right.

Link to comment
Share on other sites

Hi T Love thanks for the reply.

 

As you can see from the pictures this is the java version.

My understanding of this contrib is that if the browser viewing the page doesnt have java installed then it should display the none java version. As I said I may be wrong on that?

 

link is www.get-wireless.co.uk <--It is a live shop tho not with many products yet.

 

I was thinking about removing the coolmenu and going for the one on this

http://www.ciraoptika.cz/index.php?cPath=7...928f270ac7d4492 site. Although I would reall like the one on www.consoleplus.co.uk but cant seem to find the contrib for that and the link thats posted on the first page of this topic doesnt seem to work.

Link to comment
Share on other sites

Hi T Love thanks for the reply.

 

As you can see from the pictures this is the java version.

My understanding of this contrib is that if the browser viewing the page doesnt have java installed then it should display the none java version. As I said I may be wrong on that?

 

link is www.get-wireless.co.uk <--It is a live shop tho not with many products yet.

 

I was thinking about removing the coolmenu and going for the one on this

http://www.ciraoptika.cz/index.php?cPath=7...928f270ac7d4492 site. Although I would reall like the one on www.consoleplus.co.uk but cant seem to find the contrib for that and the link thats posted on the first page of this topic doesnt seem to work.

 

Step number 2 of the install instructions:

 

2.) Replace the following line in your catalog/includes/column_left.php file:

REPLACE:

include(DIR_WS_BOXES . 'categories.php');

BY:

include(DIR_WS_BOXES . 'coolmenu.php');

 

Did you replace that line? It looks like you are still processing the stock categories box 'categories.php'. If you did not replace it, just comment it out: //include(DIR_WS_BOXES . 'categories.php');

Edited by T_love
Link to comment
Share on other sites

Hi T Love thanks for the reply.

 

As you can see from the pictures this is the java version.

My understanding of this contrib is that if the browser viewing the page doesnt have java installed then it should display the none java version. As I said I may be wrong on that?

 

link is www.get-wireless.co.uk <--It is a live shop tho not with many products yet.

 

I was thinking about removing the coolmenu and going for the one on this

http://www.ciraoptika.cz/index.php?cPath=7...928f270ac7d4492 site. Although I would reall like the one on www.consoleplus.co.uk but cant seem to find the contrib for that and the link thats posted on the first page of this topic doesnt seem to work.

 

 

Shaun, I've just looked at the source on your index.php page and its showing both the coolmenu contrib and the standard categories box and that is where your problem lies.

 

When using the coolmenu contrib, when javascript is enabled, the box under it should only contain a large transparent image and no text. The size of the box is then controlled by the $height variable.

 

I would therefore look at your leftcolumn.php file and also the coolmenu.php file to see where the problem is.

 

Mark.

Link to comment
Share on other sites

Shaun, I've just looked at the source on your index.php page and its showing both the coolmenu contrib and the standard categories box and that is where your problem lies.

 

When using the coolmenu contrib, when javascript is enabled, the box under it should only contain a large transparent image and no text. The size of the box is then controlled by the $height variable.

 

I would therefore look at your leftcolumn.php file and also the coolmenu.php file to see where the problem is.

 

Mark.

 

I checked the colum_left.php and sure enough I had not changed it to coolmenu. (could of sworn I had)

However after I changed it and the below pic is what I ended up with.

 

coolmenu3.JPG

As you can see the info boxes are now underneath the coolmenu.

Also I hadnt amended account_edit.php and create_account.php

 

I have also edited these and still have the same picture look as above.

I also couldnt perform step 3 or 4 on the following files

 

 

Redirect.php*

download.php

checkout_process.php

 

This is because none of those files had either the head or body tags?

 

Also does step 3 require just the files in the catalogue dir' to be edited? or is every file in all sub folders of cataogue?

 

Thanks for all suggestions so far, I have regged another account as I am using a new laptop and couldnt get the password to reset via the forum, and only way I could contact a moderator is via pm and for that I need to be logged in :roll:

Link to comment
Share on other sites

Hi, can someone help me please?

 

I have used coolmenu. After changing the column_left.php to

 

include(DIR_WS_BOXES . 'coolmenu.php');

 

the page loads only the header and the menu. If I then refresh the page the whole page is shown.

 

If I change the above line back to include(DIR_WS_BOXES . 'categories.php'); then it is fine but it shows both menus.

 

Does anyone know what is going on with this?

 

Thanks

Link to comment
Share on other sites

Hi, can someone help me please?

 

I have used coolmenu. After changing the column_left.php to

 

include(DIR_WS_BOXES . 'coolmenu.php');

 

the page loads only the header and the menu. If I then refresh the page the whole page is shown.

 

If I change the above line back to include(DIR_WS_BOXES . 'categories.php'); then it is fine but it shows both menus.

 

Does anyone know what is going on with this?

 

Thanks

Have you tried deleting your history ? just make sure its not your browser

Link to comment
Share on other sites

Have you tried deleting your history ? just make sure its not your browser

 

Thanks for your reply but tried all that. I dont think that is the problem. Also tried it on another PC.

 

This is my website.

 

Any other suggestions would be greatly appreciated.

Link to comment
Share on other sites

Thanks for your reply but tried all that. I dont think that is the problem. Also tried it on another PC.

 

This is my website.

 

Any other suggestions would be greatly appreciated.

 

Looks like you have had a similar problem to me with the other info boxes being under neath the coolmenu.

I changed the colum_left back to categories rather than coolmenu.php and the seemed to cure that pre=oblem but that will prob introduce another problem lke having both menus viasable :(

Link to comment
Share on other sites

in /includes/coolmenu.php

find

$height.= 2.65*count($categories);

and mess with the number until you get something that fits. You might also want to move your menu up and to the left a little to make it fit in the box nicely. Change these two values little by little until it looks good:

 

 oCMenu.fromLeft=10
oCMenu.fromTop=100

 

hope that helps

 

I just copy and pasted the above from a previous post. The height thing applies to the menu being on top of the other infobox

Link to comment
Share on other sites

I have two osCommerce stores, one retail and the other for wholesale B2B. I want two seperate stores for web design reasons, pricing and other offers that I do not want the retail customers to see all the time.

 

I installed the coolmenu on my wholesale store and it worked Great! just a couple of location adjustments and so far it seems OK.

 

When I did the exact same thing to my Retail store the menu showed up above the header. This store is an earlier version of OsCommerce I installed it in May of 2004, it is a 2.2 version also. I do all of my editing early in the morning when traffic is slow, I do not yet have my test server set up. Soon though!

 

Any ideas?

 

My retail store sales are very good but I really think that they would go up with this cool menu easing Navigation.

Life Is Too Short,

Enjoy Your Coffee!

Pete

Link to comment
Share on other sites

Quick fix for single quote problem.

 

Find This code in coolmenu.php

 

// remove blanks

$categories[$i]['text'] = substr($categories[$i]['text'], 12*$blank_length);

 

Add This code after the code found from above

 

$categories[$i]['text'] = htmlspecialchars($categories[$i]['text'], ENT_QUOTES);

 

 

This will fix the " ' " single quote problem with cool menu.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I have installed the cool menu and had lots of problems with it initially and have been trying to get it to automatically move the menu when you have a centered shop -rather then a static fixed width shop.

 

I have finally got a working version that i have tested with Netscape 7.1, IE 6.0, Safari 2.0.3, IE5.2.3 Mac, Opera 7.23 (windows). I havent got it to work with Netscape 4.7 though.

 

I changed the order of the includes so that the includes\coolmenu.php is the last thing in each page

before the body. This seems to allow it to get the coordinates of the div tag... if its before the end, then some browsers still work but IE6 didnt... and it doesnt seem t break anything else having at the bottom.

 

<!-- coolMenu //-->
<?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?>
<!-- coolMenu_eof //-->
</body>

 

I added a DIV tag in my includes\boxes\coolmenu.php before the script, I also have a few table tags in there as i dont use the standard header text to generate the header of the categories menu:

You will need to modify the width and height to fit your menu size i think

<div id="menuloc1" style="position:relative; width:140px; height:80px; background=#FFFFFF; "></div>

 

the DIV ID is used as the placeholder and is passed to another javascript i found from

 

http://www.walterzorn.com/dragdrop/dragdrop_e.htm

 

donation button on his website if this works for you.

 

each of my pages now has the following after the body tag:

<body>
<script type="text/javascript" src="js/wz_dragdrop.js"></script>

obviously you will need to download the js file and then upload to your server and change the location as you wish.

 

and i modified the includes\coolmenu.php using the new js functions in the wz_dragdrop.js as follows:

 

near the top of this file within the script tags:

								// the set_dhtml passes the layer name to the code - could be an image name too
				SET_DHTML("menuloc1");
							// get the info about this object
	o= dd.elements['menuloc1'];
							oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname
						   //get the element location coordiinates - cross browser compatible-ish
	oCMenu.fromLeft=o.x
	oCMenu.fromTop=o.y
						   // recalculate the coordinates after window resize
							oCMenu.onresize="location.reload()"
// rest of code still the same below..

 

I guess the location.reload could be removed if you have a fixed size site and it should still work properly, although you wouldnt need it..

 

And thats it..

Any other browsers i should test this on ? I may have an old version of gecko around

 

If it works for you then i guess it could be included in the cool menu contrib. I nearly gave up on this but am very happy it finally works ! Need some sleep now!

 

 

:blink:

Regards

Mark Brindle

Link to comment
Share on other sites

Ok went though all 54 pages still does not tell me if i need to add the 3 lines to everypage even if there is not a body tag

 

-----------------------------------------------------------------------------------------------------------------------------

3.) Add the following lines to EVERY SINGLE file in your catalog-directory RIGHT AFTER THE <BODY> TAG.

(This is VERY important, if you don't add it right after the <body>-Tag, the script won't work!!).

 

So, add these 3 lines to every file in your catlog-directory between the <body>-Tag and the including of header.php:

 

<!-- coolMenu //-->

<?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?>

<!-- coolMenu_eof //-->

 

----------------------------------------------------------------------------------------------------------------------------

So when it says catalog diectory does the mean every other director in catalog as well as admin , and everything. This thing has lost me right there. Thanks

 

And do i add it even if there is not a body tag in the file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...