Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

coolMenu


Keyser Soze

Recommended Posts

dmGremlin, I think I know which line of code you are talking of but, could you post yours?

 

You mean people still use Netscape??? :D

 

Yes, I was hoping the author of the contribution would pop in answer some of these questions.

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

the line that creates the address the menu uses to switch pages -

 

echo "','" . tep_href_link(FILENAME_DEFAULT) . "&cPath=" . $categories['id'] . "')n";

 

the tep_href_link seems to call a function that returns the url of the site plus the page that you're on, plus the session ID... the only problem with this is if the session ID goes away for whatever reason, then the address becomes illegal, I.E. 'default.php&cPath=' whatever, and causes an error.

 

My first (and only) shot at a fix was simply to remove the whole function and replace it with a static address

 

echo "','default.php?cPath=" . $categories['id'] . "')n";

 

this simply removes the session ID altogether - and since clicking on any given category typically takes you to the same search/list page, the same search/list page that can be reached through the default.php page, it doesn't really matter that the program doesn't remember what page you're on. I couldn't see any consequences of removing the session ID either... anyways, it worked fine after that.

 

A more elegant and complete solution, which I was working on up to the point I realized that there was a problem with Netscape (hey, I think it's important.... 8) ) would be to change the function itself, or add a new function so that the session ID appears after the cPath... so that the final address would look something like 'www.dm-gremlin.com/sales/default.php?cPath=7&osCid=whatever' so that in the contingency that the session ID wasn't there, it would still take you to the right place. Probably just a simple mod to the general.php or wherever that function is. If I can get this up and running with Netscape I'll definitely track this down and fix it.

 

Hope this helps!

 

-D. M.

-D. M. 8)

Link to comment
Share on other sites

Thank you :)

 

I used this contribution and just hand code the HTML as I add things:

http://www.oscommerce.com/community/contributions,780/page,7

 

Thank you so very much for this link, I just installed it a few minutes ago, And edited the sample "News" in Admin. This works like a charm :-)

Thank you "Rainguy"

 

Wayne

Carrz-Fox-Fire Promotions

Thank You

Wayne & Carr Barron

Link to comment
Share on other sites

I think there might be a problem with the way the coolMenu that was uploaded here handles identifying browser types... since the code itself seems to look ok.  I'm not sure why, but the site belonging to the person who uploaded this contribution DOES work with Netscape.  www.geraeteland.de/shop/catalog/ but upon closer inspection, his code creates a slightly different html page than is created by the code that he uploaded.  I wish he would read this - as I think he may have inadvertently made a mistake as he was generously creating a package for us to share from the code he uses on his site.  

 

i DID read this... but atm i have no time because i am writing a few tests during the next 2 weeks... (i'm a student)

 

AND i am VERY ANNOYED because a LOT OF PEOPLE ARE COPYING THE LAYOUT OF MY WEBSITE WITHOUT ASKING FOR PERMISSION:

 

EXAMPLE: http://www.savemedia.de/demo4/

 

THEREFORE NO SUPPORT ATM. sorry :evil:

Link to comment
Share on other sites

A more elegant and complete solution, which I was working on up to the point I realized that there was a problem with Netscape (hey, I think it's important....  8) ) would be to change the function itself, or add a new function so that the session ID appears after the cPath... so that the final address would look something like 'www.dm-gremlin.com/sales/default.php?cPath=7&osCid=whatever' so that in the contingency that the session ID wasn't there, it would still take you to the right place.  Probably just a simple mod to the general.php or wherever that function is.

 

Thats EXACTLY the problem: I didn't want to modifiy the function tep_href_link() in general.php because other parts of the shop might not work properly if you change things there...

 

The problem is just that people are using the session-id-killer - if they wouldn't, there wasn't a problem at all.

 

Regards

&y (www.geraeteland.de)

Link to comment
Share on other sites

i DID read this... but atm i have no time because i am writing a few tests during the next 2 weeks... (i'm a student)

 

THEREFORE NO SUPPORT ATM. sorry  :evil:

 

:wink: good luck with the tests.

 

L

Link to comment
Share on other sites

I found the fix for coolMenu with Netscape browsers

 

Open /includes/coolmenu.php

 

At the very end there is a commented credits line -

 

<!-- Copyright 2002 www.dhtmlcentral.com modified

for osCommerce by Andreas Kothe - www.oddbyte.de -->

 

This is the problem since there is a hard carriage return between "modified" and "for", and Netscape is breaking because of it.

 

Put it all on one line like

<!-- Copyright 2002 www.dhtmlcentral.com modified for osCommerce by Andreas Kothe - www.oddbyte.de -->

 

And it works perfectly with all versions of Netscape

Link to comment
Share on other sites

Thank you [zookerman] for the information, That will come in really handy.

But could someone please tell me HOW?? to do the coolmenu? As right now I have tried the "Coolmenu" and to no avail. The size of the "Categories" table, did not do right, the Menu was covering up everything, and did not fit in the Table and so on.

Could someone please let me know, about how the successfully made the menu work for them, As it is allot more professional that the [Menubar] that I am using right now.

 

Thank you to anyone that can give me some sort of information on this.

 

Wayne

Carrz-Fox-Fire Promotions

Thank You

Wayne & Carr Barron

Link to comment
Share on other sites

Great work Zookerman! Thanks much! I'm going to go test this out later today and see if I can pop in a new function to fix the session ID thingy. Mmmm... Open source is a wonderful thing.

 

Hey there Keyser! Good to see that you're still around! Thanks for this great menu contribution. I'm sorry to hear that people are copying your site - annoying yes, but I suppose imitation is also the sincerest form of flattery. They perhaps admire your creativity a little too much. Well, I hope you do well on your tests!

 

Hi Carrzkiss, I can't remember offhand where it is exactly in the code, but somewhere in one of the PHP files, I think the main coolmenu.php in the includes folder, you can set the vertical and horizontal locations of the menu... I don't remember what the default setting is, something like 150 or so. You just need to tweak this until it lines up with your categories box. Also, in the coolmenu.php in the includes/boxes directory you can set the height/width of the table that will hold the coolmenu dhtml menu - the same way you would fix the width/height of an html menu - assuming it isn't working properly. I've got a busy day today, but I'll post more specific info later on once I've figured out this function thingy if you still help.

 

8)

-D. M.

-D. M. 8)

Link to comment
Share on other sites

Hi Carrzkiss, I can't remember offhand where it is exactly in the code, but somewhere in one of the PHP files, I think the main coolmenu.php in the includes folder, you can set the vertical and horizontal locations of the menu... I don't remember what the default setting is, something like 150 or so.  You just need to tweak this until it lines up with your categories box.  Also, in the coolmenu.php in the includes/boxes directory you can set the height/width of the table that will hold the coolmenu dhtml menu - the same way you would fix the width/height of an html menu - assuming it isn't working properly.   I've got a busy day today, but I'll post more specific info later on once I've figured out this function thingy if you still help.  

 

8)  

-D. M.

 

Hello DM;

I have done what you have suggested, And I have the Menu seting correct

For heigth and width, But for the "includes/boxes/coolmenu.php" I do not see anything in there, that would represent the h/w of the box? This is the only thing that I see that is close to the w/h of the box.

But as you can see, there is nothing for the Height, except "$height" ?

In other information, is greatly appreciated.

Wayne

  $info_box_contents[] = array('text'  => '

<img src="images/trans.gif" width="150" height="' . $height . '">');

 

Also,

where do you put in the code to add an image header??? To the

Box??? This is from my: Boxes/Categores.php file

<tr>

<td>

<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>

<TR>

 <TD COLSPAN=3>

	 <IMG SRC="images/boxes/table_categories.gif" WIDTH=173 HEIGHT=20></TD>

</TR>

<TR>

<td>

 

Thank You

Wayne

Carrz-Fox-Fire Promotions

Thank You

Wayne & Carr Barron

Link to comment
Share on other sites

carrzkiss

 

Set the position of the coolMenu in

/includes/coolmenu.php not /includes/boxes/coolmenu.php

 

Look for the properties - oCMenu.fromLeft= oCMenu.fromTop=

 

Play around with the values to move the menu up and down and left and right. Also this exact issue was addressed in other parts of this thread, so take some time and read everything in this thread and I am sure you will get it working the way you want.

 

Good luck

Link to comment
Share on other sites

carrzkiss

 

Set the position of the coolMenu in

/includes/coolmenu.php not /includes/boxes/coolmenu.php

 

Look for the properties - oCMenu.fromLeft=   oCMenu.fromTop=

 

Play around with the values to move the menu up and down and left and right.  Also this exact issue was addressed in other parts of this thread, so take some time and read everything in this thread and I am sure you will get it working the way you want.

 

Good luck

 

I got it :-)

 

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

 

Thank You

Now to play with the Color, and also with the SLOW. menu load.

On MouseOver.

 

Wayne

Carrz-Fox-Fire Promotions

Thank You

Wayne & Carr Barron

Link to comment
Share on other sites

Possible solution for the session ID thingy... this pops those bad boys in the right order. Give this a shot:

 

replace:

echo "','" . tep_href_link(FILENAME_DEFAULT) . "&cPath=" . $categories['id'] . "')n";

 

with:

$cPath_new = 'cPath=' . $categories['id'];

echo "','" . tep_href_link(FILENAME_DEFAULT, $cPath_new) . "')n";

 

I borrowed and adapted a bit 'o code from the other dhtml menu. I think this should work. Works over here so far so good.

 

-D. M.

-D. M. 8)

Link to comment
Share on other sites

Possible solution for the session ID thingy... this pops those bad boys in the right order.  Give this a shot:

 

replace:

echo "','" . tep_href_link(FILENAME_DEFAULT) . "&cPath=" . $categories['id'] . "')n";

 

with:

$cPath_new = 'cPath=' . $categories['id'];

echo "','" . tep_href_link(FILENAME_DEFAULT, $cPath_new) . "')n";

 

I borrowed and adapted a bit 'o code from the other dhtml menu.  I think this should work.  Works over here so far so good.  

 

-D. M.

 

Looks good :)

 

I will change this in my files and the little Carriage Return Netscape Bug and then i will upload it as a bugfix in the contrib-section.

 

Regards

&y

Link to comment
Share on other sites

Just put the updated version of this on a brand-new install and have a few problems:

 

1. The session ID thing still seems to be causing a problem. The installation is absolutely default - no options have been changed at all, but the links point to (for example) default.php&cPath=1

 

2. The menu spacing is a bit odd. Each row is twice the height it needs to be, so the box overlaps the box below.

 

Anyone else getting these problems?

Link to comment
Share on other sites

:oops: Oops! Failed upload (it's been a long day)! The paths work fine now. Just need to take a look at the positioning.

 

Think I may turn the fade off as well, as it is beginning to bug me already. Haven't seen where this is handled yet. Any pointers?

Link to comment
Share on other sites

Think I may turn the fade off as well, as it is beginning to bug me already. Haven't seen where this is handled yet. Any pointers?

 

Following my theme of the day of answering my own posts, this is in /includes/coolmenu.php . Search for "rogid:DXImageTransform.Microsoft.Fade"

 

That means that the only problem I can see at the moment is that the list of categories can obscure the box below it. I suppose that the box height could be manually adjusted, but this seems rather inelligant. If I use this on a live site then I maymake a change to set the box height automatically (unless this is just something I am overlooking, which is quite possible today).

Link to comment
Share on other sites

That means that the only problem I can see at the moment is that the list of categories can obscure the box below it. I suppose that the box height could be manually adjusted, but this seems rather inelligant. If I use this on a live site then I maymake a change to set the box height automatically (unless this is just something I am overlooking, which is quite possible today).

 

If someone has a unique solution for this "adjustment-problem", pleas post it here. but i think it is impossible, everyone has to adjust this on his site... :?

Link to comment
Share on other sites

please take a look at this:

 

If someone has solutions, please post them here. thanks.

 

that's why i like open source! :P

You find bugs much faster and a big community can help you to solve them.. :D

 

----- Original Message -----

From: Sebastien St-Laurent

To: [email protected]

Sent: Friday, March 21, 2003 7:33 AM

Subject: CoolMenu for OsCommerce.

 

 

Hi.

 

 

 

I?v been using it for a couple days and have dealt with a few bugs? I?m including a modified files including my fixes? Here is what I found :

 

 

 

- Don?t know if it?s for compatibility reasons, but I found no need to have to insert the JavaScript at top of all my .php files. I?v integrated all the code within categories_dhtml.php making installation much easier

 

- Links for the categories aren?t built correctly with respect to 2 things

 

o Forcing the link to be along the style of ???cPath=?? doesn?t always work as there are times where there is no preceding character. The tep_href_link function take extra params to deal with this

 

o If you pick a sub category, it builds the path with only the category you?re going to not properly updating the breadcrumbs, need something like ?cPath=top_sub1_sub2? and not ?cPath=sub2?

 

- The print_menu_line function doesn?t do a good job at building menu element names. Since It?s just plainly concatenating a bunch of numbers. If you have a sub menu with more than 9 items, you can get into problems? Sub110 can be wither 1->1->0 or 1->10. I?v added ?_? separators inbetween the numbers.

 

 

 

Hope it helps,

 

Sebastien St-Laurent

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...