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

I tried this conttibution and all seems to be working well. I would like to verify a couple things.......

 

**ONLY the files in the main CATALOG directory need the following changes, correct? The step after this cleary states in the directions "(only in the /catalog directory, NOT in any further subdirectories like /catalog/includes !!).", but this step didnt:

 

"<!-- coolMenu //-->

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

<!-- coolMenu_eof //-->"

 

 

 

**Now it also said to change EVERY file, but some files didnt even contain the HEAD or BODY tags, and a couple other files were a bit different then the majority of the others so I didnt change those either. Could somebody let me know if I need to change the following files in the main catalog directory?

 

checkout_process.php

download.php

info_shopping_cart.php

popup_image.php

redirect.php

 

 

**I also saw that the menu supposedly disappears if you have java disabled. I purposely diabled it and the menu is still showing. Do I have to dump my cache first?

 

Im running 2.2 MS2. Thanks!

Link to comment
Share on other sites

also, after the order processes(authoriz.net), on the order completed screen, the menu disappears. It only disappears on that page though. I double checke the CHECKOUT_SUCCUESS.PHP file, and the changes for coolmenu are the same as any other page. Any ideas?

Link to comment
Share on other sites

Sorry hjp, i didn't see your replay.

 

I installed the Coolmenu as you said it in page 50.

I'm using STS and all i can see is a blank box saying "coolmenu" in the top.

Could you please help me out?

 

Thanks

Using my coolmenu contribution I did this:

 

Normally the menu_animation.js file would have to be added on every php page - with a <head> tag in it - in the oscommerce root directory but with the STS this seems not to be nescessary so in stead

 

In /includes/sts_templates.php (around line 29) I put:

<html>
<head><script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT>
<!--$headcontent-->
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>

at the top (added the menu_animation file)

 

in /includes/column_left.php

I put

  if ((USE_CACHE == 'true') && empty($SID)) {
   echo tep_cache_categories_box();
 } else {
//    include(DIR_WS_BOXES . 'categories.php');
    include(DIR_WS_BOXES . 'coolmenu.php');
 }

The coolmenu.php replaces the original category box

 

and in /includes/footer.php

I put

 

<table border="0" width="100%" cellspacing="0" cellpadding="1"><?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?>
 <tr class="footer">
   <td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>

 

added the coolmenu include

Link to comment
Share on other sites

can anybody tell me if I need to modify the following files:

 

checkout_process.php

download.php

info_shopping_cart.php

popup_image.php

redirect.php

 

 

Also, is the menu even SUPPOSE to show on the checkout success page? Id like to make sure this thing is running at 100%. Thanks for any help.

Link to comment
Share on other sites

hi, ok. I looked back to see if I could find my answer for why I get blank box for coolmenu but only the STS version was explained. I'm pretty certain that I placed the scripts in the right places (head and body ) ..... .

 

below is an example of my index.php up till parts that contain both scripts....

 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
<?php

 

 

 

Also, when I place the menu on dhtml function, I get the following error:

 

 

[/code]/********************************************************************************

************************************************************* * © Ger Versluis 2000 version 5.411 24 December 2001 (updated Jan 31st, 2003 by Dynamic Drive for Opera7) * HV Menu found on Dynamic Drive ONLY may be used on both commercial and non commerical sites * * For info write to [email protected] * * This script featured on Dynamic Drive DHTML code library: http://www.dynamicdrive.com ********************************************************************************

**************************************************************/ var LowBgColor='transparent'; // Background color when mouse is not over var LowSubBgColor='white'; // Background color when mouse is not over on subs var HighBgColor='transparent'; // Background color when mouse is over var HighSubBgColor='white'; // Background color when mouse is over on subs var FontLowColor='black'; // Font color when mouse is not over var FontSubLowColor='black'; // Font color subs when mouse is not over var FontHighColor='#6699cc'; // Font color when mouse is over var FontSubHighColor='#6699cc'; // Font color subs when mouse is over var BorderColor='transparent'; // Border color var BorderSubColor='#6699cc'; // Border color for subs var BorderWidth=1; // Border width var BorderBtwnElmnts=0; // Border between elements 1 or 0 var FontFamily="Verdana, Arial, sans-serif" // Font family menu items var FontSize=8; // Font size menu items var FontBold=0; // Bold menu items 1 or 0 var FontItalic=0; // Italic menu items 1 or 0 var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right' var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right' var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static var ChildOverlap=.0; // horizontal overlap child/ parent var ChildVerticalOverlap=.0; // vertical overlap child/ parent var StartTop=1; // Menu offset x coordinate var StartLeft=0; // Menu offset y coordinate var VerCorrect=0; // Multiple frames y correction var HorCorrect=0; // Multiple frames x correction var LeftPaddng=2; // Left padding var TopPaddng=1; // Top padding var DissapearDelay=500; // delay before menu folds in var FirstLineHorizontal=0; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL var MenuFramesVertical=1; // Frames in cols or rows 1 or 0 var TakeOverBgColor=1; // Menu frame takes over background color subitem frame var FirstLineFrame='navig'; // Frame where first level appears var SecLineFrame='space'; // Frame where sub levels appear var DocTargetFrame='space'; // Frame where target documents appear var TargetLoc='MenuBar'; // span id for relative positioning var HideTop=0; // Hide first level when loading new document 1 or 0 var MenuWrap=1; // enables/ disables menu wrap 1 or 0 var RightToLeft=0; // enables/ disables right to left unfold 1 or 0 var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover var WebMasterCheck=0; // menu tree checking on or off 1 or 0 var ShowArrow=1; // Uses arrow gifs when 1 var KeepHilite=1; // Keep selected path highligthed var Arrws=['images/tri.gif',5,10,'images/tridown.gif',10,5,'images/trileft.gif',5,10]; // Arrow source, width and height function BeforeStart(){return} function AfterBuild(){return} function BeforeFirstOpen(){return} function AfterCloseAll(){return} function Go(){return}

Fatal error: Call to undefined function: tep_has_category_subcategories() in c:\SP\artwww\health\shops\includes\boxes\categories_dhtml.php on line 113

the categories_dhtml.php  error pertains to the following code:

$haschildren=tep_has_category_subcategories($categories['categories_id']);

 

 

so please help!

Link to comment
Share on other sites

SORRY. it is the last code that should be in the box and not my comment!

Not sure of which file you are showing the contents.

 

But I don't see where you include the 'menu_animation.js' file.

And

A) where do you include the coolmenu.php file

B) in which box do you display the coolmenu

 

and what method did you use to install the coolmenu distribution?

Link to comment
Share on other sites

Has someone been able to make coolmenu work if some categories names contain single quotes ?

 

Thanks for your replies,

--

R?mi

Yes if you looked through the posts there are more answers to that question.

 

But here it is again: you have to backslash the quote sign like this \'

Link to comment
Share on other sites

Thanks hjp.

I doing something wrong but don't know what.

Still getting a blank box in the place of the coolmenu, saying "coolmenu".

do you have a link to your page?

Edited by hjp
Link to comment
Share on other sites

Has someone been able to make coolmenu work if some categories names contain single quotes ?

Yes if you looked through the posts there are more answers to that question.

 

But here it is again: you have to backslash the quote sign like this \'

Yep, did that, but then it appears fine in the menu, but all such names contain the \ on the pages, which is not fine.

 

Anyway, I did it by modifying osC so that it stores " & # 3 9 ; " (without the spaces) in place of ' in the DB, which achieves what I need. Anyway Easypopulate already does that, so now my osC is consistent with EP, and coolmenu can display quotes :-)

 

Thanks for your answer.

Link to comment
Share on other sites

QUOTE (alibak @ Jul 14 2004, 12:35 AM)

SORRY. it is the last code that should be in the box and not my comment!

 

Not sure of which file you are showing the contents.

 

But I don't see where you include the 'menu_animation.js' file.

And

A) where do you include the coolmenu.php file

in which box do you display the coolmenu

 

and what method did you use to install the coolmenu distribution?

 

I have the menu_animation.js in the catalog\includes section and one coolmenu.php in the catalog\includes and the other one in the catalog\includes\box\

 

when I place the menu on dhtml function, I get the following error:

someone asked about the location of the following code and here it is:

 

This is the error:

 

Fatal error: Call to undefined function: tep_has_category_subcategories() in c:\catalog\includes\boxes\categories_dhtml.php on line 113

 

and,

the categories_dhtml.php error pertains to the following code:

$haschildren=tep_has_category_subcategories($categories['categories_id']);

 

 

I looked back to see if I could find my answer for why I get blank box for coolmenu but only the STS version was explained. I'm pretty certain that I placed the scripts in the right places (head and body ) ..... .

 

below is an example of my index.php up till parts that contain both scripts....

 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
  <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
  </table></td>
<!-- body_text //-->
<?php

Link to comment
Share on other sites

Sorry to do this if someone already posted a problem about the box not being in the right place after following the installation.

 

here is a link to it: http://newmexicanconnection.com/shop

 

there were two coolmenu.php files in the zip and i think i put the right one in the the right area. the larger file in the includes and smaller in the boxes.

 

i will start looking from the beginning but was just hoping someone can point me down the right path to get this script working because i just absolutely love it.

 

thanks for your time and patience w/ this novice.

 

adieu,

macie

Link to comment
Share on other sites

Sorry to do this if someone already posted a problem about the box not being in the right place after following the installation.

 

here is a link to it:  http://newmexicanconnection.com/shop

 

there were two coolmenu.php files in the zip and i think i put the right one in the the right area.  the larger file in the includes and smaller in the boxes.

 

i will start looking from the beginning but was just hoping someone can point me down the right path to get this script working because i just absolutely love it.

 

thanks for your time and patience w/ this novice.

 

adieu,

macie

Edit the coolmenu.php file in the INCLUDES folder.

 

Look for the variables:

 

oCMenu.fromLeft=10

oCMenu.fromTop=240

 

These control the position of the menu box. Amend away as required.

Link to comment
Share on other sites

Ok I have look through all 10 pages of this topic and I am yet to discover is this cool menu ever worked or works with the STS (Latest version).

 

There is a lot of mention of it in here but no difinative answer?

 

I have a bare oscommerce install and STS installed and working. Now i just need to add this cool menu thing.

 

If there is a fix for it can someone give me a link to the right page? Rather than link this topic again!! :)

 

Thanks.

Link to comment
Share on other sites

Any clever people got a free moment to help me understand this?

 

Coolmenu has not been resizing itself as I add or remove Top level categories in my catalogue.

 

Waht I have found is this ..

 

If I take the code in 'includes/coolmenu.php' that reads $height.= 2.65*count($categories), somewhere around line #174 and increment by '1' for each top level category it sizes correctly. So, with 4 categoris active I have to set it to 6.65 and for 5 categories to 7.65 and so on ..

 

My suspicion is that somethin is not allowing coolmenu to count my categories (I guess that is waht the 'count($categories)' bit does?

 

Has any wise head got any ideas how so, or why?

 

 

 

The results, so far of my amateur thrashing around can be seen at Vending Warehouse btw ..

Edited by Clueless Git
Link to comment
Share on other sites

Ok I have look through ALL 72 pages of this topic and I have yet to discover how to get this thing to work. I'm using oscommerce-2.2ms2.

 

I've followed the instructions to the TEE!!

 

I've disabled some fo the functions in here so that it is only a catalog, technically that shouldn't have any effect on making this work. When I view the source through a browser, it appears to be creating the menu, but it does not show in the category box.

 

The little hair I haven't pulled out yet is turning gray!!

 

CAN SOMEONE PLEASE HELP!!

 

 

Thanks.

Link to comment
Share on other sites

Ok I have look through ALL 72 pages of this topic and I have yet to discover how to get this thing to work. I'm using oscommerce-2.2ms2.

 

I've followed the instructions to the TEE!!

 

I've disabled some fo the functions in here so that it is only a catalog, technically that shouldn't have any effect on making this work. When I view the source through a browser, it appears to be creating the menu, but it does not show in the category box.

 

The little hair I haven't pulled out yet is turning gray!!

 

CAN SOMEONE PLEASE HELP!!

 

 

Thanks.

mine does the same thng

Link to comment
Share on other sites

Any clever people got a free moment to help me understand this?

 

Coolmenu has not been resizing itself as I add or remove Top level categories in my catalogue.

 

Waht I have found is this ..

 

If I take the code in 'includes/coolmenu.php' that reads $height.= 2.65*count($categories), somewhere around line #174 and increment by '1' for each top level category it sizes correctly. So, with 4 categoris active I have to set it to 6.65 and for 5 categories to 7.65 and so on ..

 

My suspicion is that somethin is not allowing coolmenu to count my categories (I guess that is waht the 'count($categories)' bit does?

 

Has any wise head got any ideas how so, or why?

 

 

 

The results, so far of my amateur thrashing around can be seen at Vending Warehouse btw ..

Why not just set the height to a static size. Thats what most people have done and the menu looks consistant all the time.

 

It only takes a few moments to amend the size once all the categories are in.

 

After all its not very often that you add or remove top level categories. so making the amendment is not a great inconvienience.

Link to comment
Share on other sites

Matt & Jason

 

I have made Coolmenu work succesfully apart from my above with resizing the category box.

 

Can you both post links to the sites whre you are having problems?

 

I am thinking that if we have each made different aspects of it work then mebbe we can help each other out?

 

As a side note; I read earlier on that code not being offered in the contribution is being used by the author on his own site, it also appears that his one of a very few sites that are not experiencing problems with it.

Link to comment
Share on other sites

Any clever people got a free moment to help me understand this?

 

Coolmenu has not been resizing itself as I add or remove Top level categories in my catalogue.

 

Waht I have found is this ..

 

If I take the code in 'includes/coolmenu.php' that reads $height.= 2.65*count($categories), somewhere around line #174 and increment by '1' for each top level category it sizes correctly. So, with 4 categoris active I have to set it to 6.65 and for 5 categories to 7.65 and so on ..

 

My suspicion is that somethin is not allowing coolmenu to count my categories (I guess that is waht the 'count($categories)' bit does?

 

Has any wise head got any ideas how so, or why?

 

 

 

The results, so far of my amateur thrashing around can be seen at Vending Warehouse btw ..

Why not just set the height to a static size. Thats what most people have done and the menu looks consistant all the time.

 

It only takes a few moments to amend the size once all the categories are in.

 

After all its not very often that you add or remove top level categories. so making the amendment is not a great inconvienience.

Hi Mark ...

 

Yuss, manual resizing is exactly what I have been doing - I found no references to other people having had to do that, untill you posted, tho' ..

 

You are correct imho. Top categories should not change that often so it is not that big a deal. Perhaps I have been sweating the petty stuff when I should have been petting the sweaty stuff? :huh:

 

I am still interested to find out why the auto sizing worketh not, if anybody knows?

Link to comment
Share on other sites

Any clever people got a free moment to help me understand this?

 

Coolmenu has not been resizing itself as I add or remove Top level categories in my catalogue.

 

Waht I have found is this ..

 

If I take the code in 'includes/coolmenu.php' that reads $height.= 2.65*count($categories), somewhere around line #174 and increment by '1' for each top level category it sizes correctly. So, with 4 categoris active I have to set it to 6.65 and for 5 categories to 7.65 and so on ..

 

My suspicion is that somethin is not allowing coolmenu to count my categories (I guess that is waht the 'count($categories)' bit does?

 

Has any wise head got any ideas how so, or why?

 

 

 

The results, so far of my amateur thrashing around can be seen at Vending Warehouse btw ..

Why not just set the height to a static size. Thats what most people have done and the menu looks consistant all the time.

 

It only takes a few moments to amend the size once all the categories are in.

 

After all its not very often that you add or remove top level categories. so making the amendment is not a great inconvienience.

Hi Mark ...

 

Yuss, manual resizing is exactly what I have been doing - I found no references to other people having had to do that, untill you posted, tho' ..

 

You are correct imho. Top categories should not change that often so it is not that big a deal. Perhaps I have been sweating the petty stuff when I should have been petting the sweaty stuff? :huh:

 

I am still interested to find out why the auto sizing worketh not, if anybody knows?

The calculation method is wrong.

 

you may calculate the box height dynamically like this:

(Notice that you have to substitue A with the heigh of your coolmenu levels)

 

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

Edited by hjp
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...