Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

coolMenu


Keyser Soze

Recommended Posts

Ok this is very long discussion so I wasn?t able to go through everything could some please tell me if there was a good solution to display the menu in absolute position?

 

? Or any other help in that topic my store is centered and it wont work the way it is now

Thanx all

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Ok this is very long discussion so I wasn?t able to go through everything could some please tell me if there was a good solution to display the menu in absolute position?

 

? Or any other help in that topic my store is centered and it wont work the way it is now

Thanx all

Refer to Page 67 for a solution that worked for me.

Link to comment
Share on other sites

so does this contrib work or not?

I intalled it and it works (as going where it should) but the menu has the search box in the middle, Its hard to explain but its like the menu is behind the other boxes

help pls?

I ll keep trying but pls help

 

thanks

 

j.

Link to comment
Share on other sites

Hello all !!! I was wondering if i could most humbly ask for a quick bit of advice on coolmenu.

 

First of all you can check out the problem, though it may look ok if your in mozzila.

 

I have this contribution installed and have read through most of the posts, but can not find solution for my predicament. Its made harder because i do'nt have IE to quickly test with it. I am using Mozzilla and Konquerer to test view. It looks fine now in Mozzila but not in konquerer, it seems to push the rest of my page down.

 

I have tried to modify it by puting the menu in the header instead of in column left. I have made loads of changes and can't remember what i have changed. I was wondering if someone could tell me if it is ok in IExplorer.

 

You can view it here: http://www.digimarksystems.com.au/catalog/catalog/index.php

 

Also i have tried checking the site code at http://validator.w3.org/

 

I am just starting out in php though so don't know how to modify the error that it is pointed out. Mainly it is saying i have forgotten to cloes html tags </table> <td> and so forth. Here are a few that include some javascript errors that it brings up. I want to try to solve these first.

 

Errors from W3.org Validator

 

 

///////////////////////////////////////////--------------------->

 

Below are the results of attempting to parse this document with an SGML parser.

 

1.___________________________________________

 

Line 4, column 65: required attribute "TYPE" not specified

 

...AGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT>

 

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

 

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

 

2._____________________________________________

 

Line 16, column 9: required attribute "TYPE" not specified

 

<script>

 

3._________________________________________________

 

Line 138, column 52: there is no attribute "HEIGHT"

 

<table border="0" width="785" align="center" height="20" cellspacing="0" cellpadding="1">

 

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

 

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

 

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

 

4._________________________________________________________________

 

Line 139, column 7: end tag for "TABLE" which is not finished

 

</table>

 

Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

 

Another possibility is that you used an element (e.g. 'ul') which requires a child element (e.g. 'li') that you did not include. Hence the parent element is "not finished", not complete.

 

///////////////////////////////////////////////////---------------------->

 

there are further errors but i don't wanna waste too much time.

 

Please could somone tell me what i'm missing here.............................

 

 

 

.....:::::Acrylictribesmen::::::........

Link to comment
Share on other sites

P.S I also can not find any pages in the post that says where in the javascript you change the end position that the submenus come up. I want then to drop down rather than come out to the right. Is there a page anywhere in this post that mentions where this part of the code can be altered?

 

Thanks in advance again.

 

....:::::Acrylictribesmen:::::.....

Link to comment
Share on other sites

Hey I just found a bug with Cool Menu if someone want to let me know why it occurs.

 

When in Admin and you go to the configuration and set Cache to 'True' and the dir to /tmp cool menu doesn't format properly on the screen.

 

Any suggestions?

 

Brad

Link to comment
Share on other sites

Hey I just found a bug with Cool Menu if someone want to let me know why it occurs.

 

When in Admin and you go to the configuration and set Cache to 'True' and the dir to /tmp cool menu doesn't format properly on the screen.

 

Any suggestions?

 

Brad

Brad,

 

I am having the same issue as you...i'm searching around to find a solution..let me know if you find something and I will do the same.

 

btw, are you on a shared server? I have 2 osc sites on my server, and I thought if I change the path of the config file from /tmp/ to the actual root of each site there wouldn't be any problems.

Edited by safoo
Link to comment
Share on other sites

Been using coolmenu on a few sites for a while, & love it.

 

Currently adding it to a multi-language site and having a problem that I have not encoutered before. The french category structure contains lots of apostrophes (e.g. a category Mat?riel Pour l'Evaluation ), which it appears stops the menu displaying.

 

I've seen a couple people comment on this when using english names ending in 's & wondered whether anyone had a solution other than to remove the apostrophes

Link to comment
Share on other sites

Posting a problem here seems to have an amazing impact on my ability to solve it myself!

 

If anyone else is suffering from apostrophe problems, here is the solution I am using:

 

around line 151 of /includes/coolmenu.php find the line:

 

echo $categories['text'];

 

and replace it with

 

echo str_replace("'","\'",$categories['text']);

 

simple

Link to comment
Share on other sites

Mat,

 

thanks for the info. do you have any links to the sites that are using it. I just read all 77 pages over the last 2 days and its not clear to me if it will even work. I don't like the fact that I have to add code in over 30 files! I think I might give it a go later tonight and see how it goes.

Link to comment
Share on other sites

I have a small problem with my coolmenu install. When ever I add a sub catagory to the last catagory on the menu an additional blank box is added to the menu's height (at the bottom). If I add 2 sub catagories it adds 2 blank boxes to the bottom of the menu. This only happenes when adding sub cat's to the last catagory. Anyone have any ideas?

Edited by Kauzmo
Link to comment
Share on other sites

in some of the other menu contributions i've seen that you can add a bullet, or other useful image before the category text, where do i add the reference to my bullet gif or jpg so that it displays. I'm just not sure where in the menu script this would be? Please help!

 

here's a link to my mewu if ya wanna check out what i', tryin to do>

 

http://www.digimarksystems.com.au/catalog/index.php

 

 

:blink: :unsure: :blink:

 

...::Acrylictribesmen::...

Link to comment
Share on other sites

How do you make this align correctly for the screen size? I have my monitor set to 1024x768 but at different resolutions the box is not aligned correctly?

I second this and i have a site that goes from right to left and the arrow come in on the left side ... i need it on the right

Link to comment
Share on other sites

Hello all

 

Does anyone know if this will work if I already have a java script menu on my site?

 

this is my site..

 

I installed the cool menu and I get the blank area and I was wondering if that was because I have another menu install..

 

I installed one on the top of my page.

 

here is my site. My Webpage

thank you for your help

Naomi

Link to comment
Share on other sites

how do i set the postition of the box - my category is on he right side of the screen and the whole page is being centered to 770px .

 

The box is not coming up in the correct postion and how do i change the location of the arrow ?

Link to comment
Share on other sites

roxor

 

hello,

 

i have one problem with the cool menu v1.2,

 

the coolmenu don't appear, they are just the boxe "coolmenu" but she is empty

 

please help me

 

(sorry for my very bad english)

 

Do you have items already in your categories...

 

and do any names have a ' like names's

 

if they do they (')

 

and it should work, That is the problem I had.

 

 

now I have a different problem

 

please go here.

 

I have the original mene under the cool menu showing up.. how do I fix this..

other wise I just love this.. thank you very much

Naomi

Link to comment
Share on other sites

AS usuall I jumped the gun.. It is correct.

 

 

 

roxor

 

hello,

 

i have one problem with the cool menu v1.2,

 

the coolmenu don't appear, they are just the boxe "coolmenu" but she is empty

 

please help me

 

(sorry for my very bad english)

 

I forgot to tell you if you have the (') please remove them.

Naomi :D

Link to comment
Share on other sites

  • 2 weeks later...

Hi all -

 

This is a great contribution.

 

I haven't found this elsewhere on this forum, forgive me if I've just overlooked it. I'd like to have my topmost links be images, rather than text. I'm trying to make a menu similar to the one here:

 

http://www.gateway.com/home

 

See how the top links are rollover images, while the pulldown stuff is all text? That's what I'd like to do. I've just started looking through all the coolmenu code, but I'm not sure I know javascript well enough to figure out what it'd take.

 

The top links will all be hard-coded, they won't be read from the database.

 

Has anyone tried this? Any help is greatly appreciated, thanks -

 

Michael

Link to comment
Share on other sites

This is in refernce to the solution posted by HJP here:

 

http://www.oscommerce.com/forums/index.php?sho...ic=35036&st=490

 

I already have coolmenu in place, this can be viewed here:

 

My Webpage

 

And I have Lindas center shop installed, it just switched off until I find solution to problem.

 

Problem:

 

I have installed HJP fix to make the cool menu dynamic and self adjust to the correct position when center shop is active. The coolmenu still works but is not adjusting position when the center shop is switched on.

 

Even when I adjust these:

 

oCMenu.fromLeft=pos[0]-2

oCMenu.fromTop=pos[1]-7

 

Nothing happens. I will post the code below for includes>coolmenu, includes>footer and includes>boxes>coolmenu in case anyone can spot a mistake:

 

 

catalog>includes>coolmenu

<?php

/* ------------------------------------------------

 coolMenu for osCommerce
 
 author:	Andreas Kothe 
 url:  http://www.oddbyte.de


 Released under the GNU General Public License
 
 ------------------------------------------------ 
*/




// --- CONFIG ---

define('SHOW_COUNT','false');
define('SUB_CATEGORIES','7');





if (MAX_MANUFACTURERS_LIST < 2) {
   $cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
} else {
   $cat_choose = '';
}

?>



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

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


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

 //Menu properties
 oCMenu.pxBetween=0
 oCMenu.fromLeft=9
 oCMenu.fromTop=176
 oCMenu.rows=0
 oCMenu.menuPlacement="left"

 oCMenu.offlineRoot=""
 oCMenu.onlineRoot=""
 oCMenu.resizeCheck=1
 oCMenu.wait=500
 oCMenu.fillImg="cm_fill.gif"
 oCMenu.zIndex=0

 //Background bar properties
 oCMenu.useBar=1
 oCMenu.barWidth="menu"
 oCMenu.barHeight="menu"
 oCMenu.barClass="clBar"
 oCMenu.barX="menu"
 oCMenu.barY="menu"
 oCMenu.barBorderX=0
 oCMenu.barBorderY=0
 oCMenu.barBorderClass=""

 oCMenu.level[0]=new cm_makeLevel()
 oCMenu.level[0].width=121
 oCMenu.level[0].height=20
 oCMenu.level[0].regClass="clLevel0"
 oCMenu.level[0].overClass="clLevel0over"
 oCMenu.level[0].borderX=1
 oCMenu.level[0].borderY=1
 oCMenu.level[0].borderClass="clLevel0border"
 oCMenu.level[0].offsetX=0
 oCMenu.level[0].offsetY=0
 oCMenu.level[0].rows=0
 oCMenu.level[0].arrow="images/arrow.gif"
 oCMenu.level[0].arrowWidth=11
 oCMenu.level[0].arrowHeight=11
 oCMenu.level[0].align="right"
 oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.8)"
<?php
for ($i=1; $i<SUB_CATEGORIES; $i++) { 
 echo'	
	 oCMenu.level[' . $i . ']=new cm_makeLevel()
	 oCMenu.level[' . $i . '].width=121
	 oCMenu.level[' . $i . '].height=20
	 oCMenu.level[' . $i . '].regClass="clLevel1"
	 oCMenu.level[' . $i . '].overClass="clLevel1over"
	 oCMenu.level[' . $i . '].borderX=1
	 oCMenu.level[' . $i . '].borderY=1
	 oCMenu.level[' . $i . '].align="right"
	 oCMenu.level[' . $i . '].offsetX=0
	 oCMenu.level[' . $i . '].offsetY=0
	 oCMenu.level[' . $i . '].borderClass="clLevel1border"
	 oCMenu.level[' . $i . '].align="right"
	 oCMenu.level[' . $i . '].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.6)"
	 
	 
 ';
} // end for




// ---

function blank_length($text) {
 $count = 0;
 while(substr($text, 0,12) == "  ") {
	 $text = substr($text, 12);
	 $count++;
 }
 return $count;
}




// ---


function print_menu_line($categories, $depth_size,$depth_parentid, $depth) {

 $size=0;
 for($i=0; $depth_size[$i]!=0; $i++) {
	 $size++;
 }


 echo "oCMenu.makeMenu('";

 if ($depth == 0) {
	 echo "top" . '_'.$depth_size[0] . "','','";
 } else if ($depth == 1) {
	 echo "sub" .'_'.$depth_size[0] .'_'. $depth_size[1] . "','top" .'_'. $depth_size[0] . "','";
 } else { // $depth < 1
	 echo "sub";
	 for ($i=0; $i<$size; $i++) {
   echo ($depth_size[$i] != 0) ? '_'.$depth_size[$i] : '_';
	 }
	 echo "','sub";
	 for ($i=0; $i<$size-1; $i++) {
   echo ($depth_size[$i] != 0) ? '_'.$depth_size[$i] : '_';
	 }
	 echo "','";
 }
 echo $categories['text'];
 if (SHOW_COUNT == 'true') {
	 $products_in_category = tep_count_products_in_category($categories['id']);
	 if ($products_in_category > 0) {
   echo "<FONT COLOR=\"#c0c0c0\">  (" . $products_in_category . ")</FONT>";
	 }
 }
 
       $cPathNew = "cPath=";
 for ($i=0; $i<$size-1; $i++) {
	 $cPathNew .= ($depth_size[$i] != 0) ? $depth_parentid[$i].'_':'';
       }
       $cPathNew .= $categories['id'];
 echo "','" . tep_href_link(FILENAME_DEFAULT,$cPathNew) . "')\n";
}



// ---


$categories = tep_get_categories('');

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

$depth=0;
$blank_length;
$depth_size;
$depth_parentid;

for($i=0; $i<count($categories); $i++) {	// don't insert 1st entry ("please choose ...")
 $blank_length = blank_length($categories[$i]['text']);

 if($blank_length == $depth) {
	 $categories[$i]['depth'] = $depth;
	 $depth_size[$depth]++;
 } else if ($blank_length > $depth) {
	 $depth++;
	 $categories[$i]['depth'] = $depth;
	 $depth_size[$depth]++;
 } else if ($blank_length < $depth) {
	 for ($j=$depth; $j>$blank_length; $j--) {
   $depth_size[$j] = 0;
   $depth--;
	 }
	 $categories[$i]['depth'] = $depth;
	 $depth_size[$depth]++;

 }
        $depth_parentid[$categories[$i]['depth']] = $categories[$i]['id'];

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

 print_menu_line($categories[$i], $depth_size,$depth_parentid, $depth);
}



?>	

 // create menu
 oCMenu.construct()

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

 </SCRIPT>

 

catalog>includes>footer

<?php
/*
 $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
   <td align="center" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'SSL'); ?>" alt="Home" class="headerNavigation">Home</a> | <a href=games.php class="headerNavigation">Fun & Games</a><img src="images/icons/new.gif">  | <a href=ringtones/index.php class="headerNavigation" >Mobile Fun</a><img src="images/icons/new.gif">   </td>
   
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center" class="smallText">
 
<div>
<table border="1" bordercolor="white" bordercolordark="white" bordercolorlight="white">
   <tr bordercolordark="white" bordercolorlight="white">
       <td width="320" bordercolordark="white" bordercolorlight="white">
           <a href="http://www.popcorn-uk.com/catalog/all_products.php"><img src="http://www.popcorn-uk.com/catalog/images/links/all_products.GIF" width="36" height="25" border="0"></a>                    </td>
       <td width="320">
           <p align="center"><img src="http://www.popcorn-uk.com/catalog/images/cards.jpg" target="_blank" border="0"><a href="http://www.worldpay.co.uk/index.php" target="_blank"><img src="http://www.popcorn-uk.com/catalog/images/poweredByWorldPay.gif" border="0"></a>
           <table>
<TR>
<TD class=main align=middle><font size="1" face="Verdana">Copyright ? 2003 - 2004 Popcorn-uk</font></TD></TR>
<TR>
<TD class=main align=middle><font size="1" face="Verdana">Images are for illustration purposes only</font></TD></TR>
           </table>

       </td>
       <td width="320">
           <p> 
           <p align="right"><a href="http://seals.squaretrade.com/cW040/766339631.map"
target="_blank"><img ismap src="http://seals.squaretrade.com/cW040/766339631.gif"
alt="Building Trust in Transactions (tm)" border=0></a>        </td>
   </tr>
</table>
</div>

   
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
 <tr>
   <td align="center" class="smallText">

 
<?php



/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/


 
?>
   </td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?>

<?php
///////////////////
// [0001] WebMakers.com Added: Center Shop
// This goes at the very end of the footer after all the tables
///////////////////

 if ( CENTER_SHOP_ON == 'on' ) {
  
///////////////////
// [0001] close table used to center
///////////////////
?>
     </td></tr>
   </table>
<?php
   if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {
    
///////////////////
// [0001] Add color to bottom of screen for large displays - needed especially on notebooks that run at 1600x1200
// close table used for outer bgcolor around the shop
///////////////////
?>
     </td></tr>
     <tr><td height="150"> </td></tr>
   </table>
<?php
   }
 }
///////////////////
// [0001] EOF: WebMakers.com Added: Center Shop
///////////////////
///////////////////

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

 

catalog>includes>boxes>coolmenu

<?php
/* ------------------------------------------------

 coolMenu for osCommerce
 
 author:	Andreas Kothe 
 url:  http://www.oddbyte.de


 Released under the GNU General Public License
 
 ------------------------------------------------ 
*/

?>
<!-- coolMenu //-->

<!-- copyright 2003 Andreas Kothe - www.oddbyte.de // -->

<tr>
 <td> 
   <table width="125" border="0" cellspacing="0" cellpadding="0" class="infoboxborder">
     <tr>
       <td>          <table width="100%" border="0" cellpadding="0" cellspacing="0" class="infoBoxContents">
           <tr> 
             <td colspan=3 width="100%"> <img src="images/boxes/table_categories.gif"></td>
           </tr>
           <tr> 
             <td width="100%"> 
               <?php


 $info_box_contents = array();
 if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
 } else {
$cat_choose = '';
 }



//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.= 21*mysql_num_rows($result)-21; //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



 new infoBox($info_box_contents);

?>
             </td>
           </tr>
         </table>
       </td>
     </tr>
   </table>    
 </td>
</tr>


<!-- coolMenu_eof //-->

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