Jump to content
Sign in to follow this  
Keyser Soze

coolMenu

Recommended Posts

Hi Hjp,

after your post i made the changes and all works now, but i have this problem:

coolmenu covers the header of manufacturers' s box. What can i do to solve this problem?

 

 

Thank You.

Share this post


Link to post
Share on other sites

HJP

 

Sorry...in fact i'm using coolmenu.

Dhtml is ok about the layout, but when i choose "Coolmenu" it works fine except the small error i told You.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

this is the same problem i'm having, and the more menu items i add, the worse the overlapping gets. anyone have a solution???

Share this post


Link to post
Share on other sites

You could use code below to calculate the height of the coolmenu box. You don't have to use 12* - the number (here 12) you have to set according to the height of

CMenu.level[0].height

 

 

$result=tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where parent_id = '0'");

$height.= 12*mysql_num_rows($result);

Share this post


Link to post
Share on other sites

Actually the calculation should be

 

$height.= A*mysql_num_rows($result)-A;

 

Where A is the height of CMenu.level[0].height

 

That would look the best I think.

Share this post


Link to post
Share on other sites

i tried the latest suggestions, but the menu comes up the same. maybe i added the new code wrong?

 

catalog/includes/coolmenu.php (about 1/2 way down the page):

##########################################

$categories = tep_get_categories('');

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

 

$result=tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where parent_id = '0'");

$height.= 14*mysql_num_rows($result)-14;

 

$depth=0;

$blank_length;

$depth_size;

$depth_parentid;

##########################################

 

is this in the right place? do i need something else?

Share this post


Link to post
Share on other sites

Yes, as I have described earlier in a post on how to lock the coolmenu in a box in order to use coolmenu on centered pages, you have to place the code in ...boxes/coolmenu.php.

You could read the post.

Share this post


Link to post
Share on other sites

Hello,

 

HELP I installed the COOL menu expacly as written, but it doesn't work? Everything is gone?

 

What did I do wrong?

Should I (in step 3)

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

 

 

Also in SUB-categories?

 

And in some files there is no <body>

 

Thanks for your help in advance.

The result of my own made mess: www.Heliman.com

 

so please tell me what I should do!!

 

Best regards

Roel

Share this post


Link to post
Share on other sites

Hello

 

Sorry I was a litle shocked when I saw my shop didn't work any more.

 

so I write clearly what I have done, and maybe some of you know what I did wrong.

 

Step 1 and 2 are done (i think no problem there)

 

step 3

In some files in the directory there is no <body> tag, so I don't copy the lines to that file.

 

Step 4

In some files there where also no <head> tags so this line I also didn't copy into that directory.

 

Step 5

Easy I just edited the text in to that file.

 

Step 6

It doesnt worke???? So??

I don't hava a clou?

 

Thanks for al the help,

Roel

Share this post


Link to post
Share on other sites

I am trying to install coolmenu, but I have the Basic Template Structure installed. I have been looking at how the boxes are changed in the BTS mod and have been trying to make those changes to coolmenu.php. I am not having much luck. Can anyone help me?

 

Thanks ahead of time.

Share this post


Link to post
Share on other sites

Hello,

 

YES I did it. The problem is when 's is used in the categorie? But Is'nt there a way to fix that 's problem?

 

So know my menu is working, but the rest of the shop is NOT displayed, is there somoen who has an answer for that problem? I don't get an error message!!

 

Thanks

Roel

Share this post


Link to post
Share on other sites

Oke......

 

That problem is know also FIXED by reading in the forum.

I addes the knew file in included/boxes and know it works.

 

BUT...... The menu is not in the richt place? Do you already found a solution for this problem?

 

please let me know.

 

Error what I see!!

- Coolmenu is not in the categorie place

- Coolmenu is to lang to fit in the categorie menu!!

 

thanks a lot!

Roel

Share this post


Link to post
Share on other sites

WOW

 

It works... Is see that reading and traying is a good way to solve problems.

 

IT WORKS perfect.

 

I want to thanks everyone who made this coolmenu work....

 

Best regards

Roel

Share this post


Link to post
Share on other sites

Someone mailed me a question concerning How to use Coolmenu with centered shop

in the Information Box.

 

I have implemented both solutions on my still unfinished Demo page http://cinter.biz/

 

Where coolmenu is used for the Category box as well as the Information Box.

 

You can look at the Page source to see how it was done.

Share this post


Link to post
Share on other sites

Hello hjp,

 

Are you using the current osc (2.2ms2) in your demo shop?

 

Also, does it continue to work if you turn off center shop?

 

Thanks for the info

Share this post


Link to post
Share on other sites

if anyone can help me that would be great..lookin for a way to lock the coolmenu infobox in place (so that when i add more categories or change resolution the box wont move on me and overlap other infoboxes such as the manufacturer box etc.

 

thanks in advances

Share this post


Link to post
Share on other sites

theman... i had the same problem.

 

the fix was posted earlier.

 

catalog/includes/boxes/coolmenu.php

 

replace this code:

$info_box_contents[] = array('text' => '<img src="images/trans.gif" width="150" height="' . $height . '">');

 

with this code:

//the code below ajusts the height of the coolmenu dynamically according to the number of categories in the main menu

$result=tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where parent_id = '0'");

$height.= 12*mysql_num_rows($result)-0;

//experiment with the multiplyer denpending on the size of your menu

 

$info_box_contents[] = array('text' => '<ilayer id="tlayerm"><div id="topm"><img src="images/trans.gif" width="150" height="' . $height . '"></div></ilayer>');

 

//src="images/trans.gif" width does not have to be "150" - I use "1"

 

from there, tweak the height multiplier (12 above) and subtracted variable (0 above) to fine-tune the size

Share this post


Link to post
Share on other sites
Hello hjp,

 

Are you using the current osc (2.2ms2) in your demo shop?

 

Also, does it continue to work if you turn off center shop?

 

Thanks for the info

Yes - it would still work and yes - I am using 2.2.ms2.

Share this post


Link to post
Share on other sites

indafastln, i follwed that post and it did not lock the toolbar (still moves when i resize the page) i dont know what im doing worng im pretty sure i folloewd the code jus as posted...plz hellp!

Share this post


Link to post
Share on other sites

First install the coolmenu contribution as described only don't insert the

require(DIR_WS_INCLUDES . 'coolmenu.php');

 

Then change the following files:

 

1: /catalog/includes/coolmenu.php

2: /catalog/includes/footer.php

3: /catalog/includes/boxes/coolmenu.php

 

1: in /catalog/includes/coolmenu.php

put this code after the <script> tag

//Extra code to find position:

function findPos(){

if(bw.ns4){ //Netscape 4

x = document.layers.tlayerm.pageX

y = document.layers.tlayerm.pageY

}else{ //other browsers

x=0; y=0; var el,temp

el = bw.ie4?document.all["topm"]:document.getElementById("topm");

if(el.offsetParent){

temp = el

while(temp.offsetParent){ //Looping parent elements to get the offset of them as well

temp=temp.offsetParent;

x+=temp.offsetLeft

y+=temp.offsetTop

}

}

x+=el.offsetLeft

y+=el.offsetTop

}

//Returning the x and y as an array

return [x,y]

}

 

oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

pos = findPos()

//Menu properties

oCMenu.pxBetween=0

//experiment with fromleft and fromtop - I use -2 and -7 but you can try something different and place the menu anywhere on the page

oCMenu.fromLeft=pos[0]-2

oCMenu.fromTop=pos[1]-7

oCMenu.onresize="location.reload()"

oCMenu.rows=0

// etc.

 

2: in /catalog/includes/footer.php place

 

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

 

at the very bottom

 

or else place the 'require coolmenu.php' in every single file under /catalog/ just befor the </body> tag (which takes a bit longer).

It must NOT EXIST ELSEWHERE in the php files under the catalog (root) directory.

If you have it after a </head> tag from an earlier installation then remove it from there.

 

3: in /catalog/includes/boxes/coolmenu.php

 

replace this code

$info_box_contents[] = array('text' => '<img src="images/trans.gif" width="150" height="' . $height . '">');

with this code

//the code below ajusts the height of the coolmenu dynamically according to the number of categories in the main menu

$result=tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where parent_id = '0'");

$height.= A*mysql_num_rows($result)-A; //where A is the height of your oCMenu.level[0].height

//experiment with the multiplyer denpending on the size of your menu

 

$info_box_contents[] = array('text' => '<ilayer id="tlayerm"><div id="topm"><img src="images/trans.gif" width="'. BOX_WIDTH .'" height="' . $height . '"></div></ilayer>');

 

//BOX_WIDTH you set in .../includes/application_top.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×