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'm sorry... it appears that both Andreas and I were misunderstood... I believe the instructions say:

 

in your catalog-directory

 

I don't see "sub-directory" anywhere.... :shock:

Link to comment
Share on other sites

I would have thought it was for all in the directort and sub directories because in the next install section it specifically states

(only in the /catalog directory, NOT in any further subdirectories like /catalog/includes !!).

 

So I figure it would have stated that in the previous one if it meant for not in the sub directories -

 

No matter, the info arrived long before I started on the sub dirs.

 

Thanks Guys!!!!!!!

Link to comment
Share on other sites

Hi there,

 

did the installation as instructed, but get only the trans.gif.

 

I went through whole the thread, and found that this was happening to several people, but did not find any solution. I can see in the source that all data are there...

 

Does anybody has an idea?

 

Thanks

 

Director of Projects

Link to comment
Share on other sites

Hi all,

I just installed this cool menu, and I found out that it is actually very cool :D

 

I just had an idea, but couldnt find the fix...

My shop is centered and the table width is 700 px, so the menu is not showing correctly.

 

I tried to create a function that is called with the BODY tag onLoad function that would look for the first corner image and then positioning the menu relative to that x and y position.

 

Something like:

function set_menu_relative (){

   for ( i=0;i<document.images.length;i++ ){

      if ( document.images[i].src.indexOf('corner_right_left.gif') ){

              var positions = new Array();

              positions[0] = document.images[i].x;

              positions[1] = document.images[i].y+10;

              return positions;

              break;

      }

   }          

} 

pos = set_menu_relative ();

 

Then (somehow) you can give that values to the object properties:

          oCMenu.fromLeft = pos[0]

         oCMenu.fromTop = pos[1]

 

This one option, another one would be to assign an id or name value to each image and find it with a similar function and place the menu.

 

Is that possible??

My javascript knowledge is not that good to implement this into my script.

Any help will be very appreciated

:)

Link to comment
Share on other sites

Better if we use the fill image...

cm_fill.gif

So it would look like:

 

function set_menu_relative (){ 

   for ( i=0;i<document.images.length;i++ ){ 

      if ( document.images[i].src.indexOf('cm_fill.gif') ){ 

              var positions = new Array(); 

              positions[0] = document.images[i].x; 

              positions[1] = document.images[i].y; 

              return positions; 

              break; 

      } 

   }          

} 

pos = set_menu_relative (); 





         oCMenu.fromLeft = pos[0] 

         oCMenu.fromTop = pos[1]

 

Anyone knows if this is possible???

Thank you.

Link to comment
Share on other sites

Hi,

 

I love the coolMenu but I think I missed something. The menu box does not get adjusted to the height of the js menu. Looks like it does not get the height from the var $height. :cry:

 

http://epssh.com/itc/default.php

 

Can anybody tell me if I oversaw anything or where I need to make the necessary change.

 

Thanks for your help.

Link to comment
Share on other sites

for the above 2 posts.

 

Check the CSS. Should solve the problem.

 

@ image based

As for basing the menu on a set pixel image is a superb idea. Have you tried posting at the site which makes the original script?

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Nice looking shop :)

 

I think you have to delete some HTML coding in your header.php file because it is showing everywhere and I don't think you have added the header image in every single file. :)

Post your header.php file so we can see what you've got.

 

Fix the height going to catalog/includes/coolmenu.php -->

oCMenu.level[0].height=24

or maybe you want to change the background .gif height??

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

this will affect to this file:

catalog/includes/boxes/coolmenu.php

right here -->

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

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

 

Then, you say you don't want category listing??

I don't understand what you mean.. sorry for my bad english :D

Link to comment
Share on other sites

Joan,

 

here is the includes/header.php. But in the coolmenu instructions I only modified the catalog files, nothing in catalog/includes?

 

<?php

/*

 $Id: header.php,v 1.1.1.1 2002/11/28 23:22:04 wilt Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2001 osCommerce



 Released under the GNU General Public License

*/



// check if the 'install' directory exists, and warn of its existence

 if (WARN_INSTALL_EXISTENCE == 'true') {

   if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

     tep_output_warning(WARNING_INSTALL_DIRECTORY_EXISTS);

   }

 }



// check if the configure.php file is writeable

 if (WARN_CONFIG_WRITEABLE == 'true') {

   if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

     tep_output_warning(WARNING_CONFIG_FILE_WRITEABLE);

   }

 }



// check if the session folder is writeable

 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

   if (STORE_SESSIONS == '') {

     if (!is_dir(tep_session_save_path())) {

       tep_output_warning(WARNING_SESSION_DIRECTORY_NON_EXISTENT);

     } elseif (!is_writeable(tep_session_save_path())) {

       tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_WRITEABLE);

     }

   }

 }



// check session.auto_start is disabled

 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

   if (ini_get('session.auto_start') == '1') {

     tep_output_warning(WARNING_SESSION_AUTO_START);

   }

 }



 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

   if (!is_dir(DIR_FS_DOWNLOAD)) {

     tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT);

   }

 }

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

 <tr class="header">

   <td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce'); ?></td>

   <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

 </tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

 <tr class="headerNavigation">

   <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

   <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

 </tr>

</table>

<?php

 if ($HTTP_GET_VARS['error_message'] != '') {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

 <tr class="headerError">

   <td class="headerError"><?php echo urldecode($HTTP_GET_VARS['error_message']); ?></td>

 </tr>

</table>

<?php

 }



 if ($HTTP_GET_VARS['info_message'] != '') {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

 <tr class="headerInfo">

   <td class="headerInfo"><?php echo $HTTP_GET_VARS['info_message']; ?></td>

 </tr>

</table>

<?php

 }

?>

[/b]

Link to comment
Share on other sites

:D the url is hiding in the code...

www.dhtmlcentral.com

Great :)

I've entered a new topic, if I have answers I will tell you.

 

 

Then, the strange "double heading image" I don't know....

I'm quite new with this and I still don't know which problems one could find.

 

Anyway, did you place the code right after every <body> tag??

Something like -->

 

<body marginwidth="0" marginheight="0" topmargin="0" >



<!-- coolMenu //-->

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

<!-- coolMenu_eof //-->



<!-- header //-->

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

<!-- header_eof //-->

 

Then, make sure you have only one of this:

<!-- header //-->

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

<!-- header_eof //-->

 

Byez!

Link to comment
Share on other sites

I went to the www.dhtmlcentral.com site and found that the menu positioning issue was already fixed in newer versions of the coolmenu, so I tried to implement it on my shop, but it only works on Netscape :?

 

Maybe someone can help me so we have coolmenues anywhere we want in our shops :D

 

What I've done so far is -->

 

## open includes/coolmenu.php

find:

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

<script>

after add:

//Extra code to find position:

function findPos(){

 if(bw.ns4){   //Netscape 4

   x = document.layers.layerMenu.pageX

   y = document.layers.layerMenu.pageY

 }else{ //other browsers

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

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

   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]

}



pos = findPos()

alert (pos);

 

find:

oCMenu.fromLeft= .....

oCMenu.fromTop= ......

comment it and add these lines:

oCMenu.fromLeft=pos[0]

oCMenu.fromTop=pos[1]

//We also need to "re place" the menu on resize. So:

oCMenu.onresize="pos = findPos(); oCMenu.fromLeft=pos[0]; oCMenu.fromTop=pos[1]"

 

## open includes/boxes/coolmenu.php

find:

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



      <TR>

        <TD>

after add:

<ilayer id="layerMenu">

<div id="divMenu">

find:

  new infoBox($info_box_contents);



?>

after add:

</div>

</ilayer>

 

## open default.php

( Let's debug only in the default.php file... )

Change the placement of the coolmenu's include statement so it is right after the column_left include.

It would look exactly like this this:

.....

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->



<!-- coolMenu //-->

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

<!-- coolMenu_eof //-->

.....

 

I've done it this way so the <div> tag is loaded before we search for it in the javascript, otherwise It would give you an error.

 

That's it.

It works on Netscape, but not with ie.

Anyone can find a fix??

ThanX

 

*Edited as requested by author (URL) - Johnson*

Link to comment
Share on other sites

hmm, IE is nolonger going to be a stand alone app. :roll:

 

What do you mean exactly with that ??

 

P.S.

Could any moderator edit my last post and change the URL DHTML.COM for www.dhtmlcentral.com please ??

ThanX!

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