Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

coolMenu


Keyser Soze

Recommended Posts

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

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);

Link to comment
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?

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

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