Geordiedan Posted August 23, 2005 Share Posted August 23, 2005 have you added the coolmenu javascript lines in both head and body sections to the all_products page as per the install instructions? :) Dan Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2005 Share Posted August 23, 2005 Dan, Just out out curiousity, after reducing the amount of queries, what did that do to the speed ratio? Was it dramatic, or just slightly better. Mark Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2005 Share Posted August 23, 2005 have you added the coolmenu javascript lines in both head and body sections to the all_products page as per the install instructions? :) Dan <{POST_SNAPBACK}> No!!! you mean i have to!!! i installed the cool menu about a week ago and installed the all products today! my memory has a span of 2 secs, so it'd be very unlikely for me to remember the instructions of the cool menu! quick better do it before i forget! thanks a lot geordidan Quote Link to comment Share on other sites More sharing options...
Geordiedan Posted August 24, 2005 Share Posted August 24, 2005 (edited) Asif - No worries mate, we all have brain frags now and then ;) Mark - it slashed the parse time by more than half, and decreased the load time further by reducing HTML page size by some 120kb! :o :blush: It also gives the benefit (IMO) of exposing more products to the customer as they click through from a higher level - greater chance of catching their attention with something, and still only 2 clicks from store entry to the product they initially wanted :) Very pleased - thanks again :thumbsup: Edited August 24, 2005 by Geordiedan Quote Link to comment Share on other sites More sharing options...
NCR2000 Posted September 5, 2005 Share Posted September 5, 2005 This is in refernce to the readjust solution posted by HJP here: http://www.oscommerce.com/forums/index.php?sho...ic=35036&st=490 It seems I am having a problem with the findPos() function in the includes/coolmenu.php file when the code is set to <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 oCMenu.fromLeft=pos[1]-2 oCMenu.fromTop=pos[0]-7 oCMenu.onresize="location.reload()" oCMenu.rows=0 oCMenu.menuPlacement="left" //ECT ECT ECT>....................................................... The menu displays nothing at all. But when I remove the findpos function using the following code, I get the menu to work but it 1. is not properly placed 2. Does not fit within the category box at all <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 oCMenu.fromLeft=100 oCMenu.fromTop=150 // oCMenu.fromLeft=pos[1]-2 // oCMenu.fromTop=pos[0]-7 //oCMenu.onresize="location.reload()" oCMenu.rows=0 oCMenu.menuPlacement="left" What is wrong with the findpos function that is causing the menu not to display? Quote Link to comment Share on other sites More sharing options...
NCR2000 Posted September 5, 2005 Share Posted September 5, 2005 anyone know how I can set it up to display the values it is getting from the findpos function? Maybe it's not grabbing any values, therefor it can't position the menu so it just doesn't display it? Quote Link to comment Share on other sites More sharing options...
NCR2000 Posted September 5, 2005 Share Posted September 5, 2005 (edited) anyone know how I can set it up to display the values it is getting from the findpos function? Maybe it's not grabbing any values, therefor it can't position the menu so it just doesn't display it? <{POST_SNAPBACK}> I've also noticed that //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.= 18*mysql_num_rows($result)-18; //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 $height. is not getting defined as well. which is causing the infobox under coolmenu not to properly adjust to the right size. Anyone know what the heck Im fogetting here? Edited September 5, 2005 by NCR2000 Quote Link to comment Share on other sites More sharing options...
srober Posted September 9, 2005 Share Posted September 9, 2005 I just added this contrabution to my site. It doest look right. My old category box is still there and the new one is just sitting right over it. What could I have done wrong? Quote Link to comment Share on other sites More sharing options...
igarden Posted September 10, 2005 Share Posted September 10, 2005 Hi All, The coolmenu is just what I'm looking for, looks great - so before I populate the site I want to get the look & feel right. I'm new, so sorry to sound dim... hi Andreas.. I've got the coolmenu instructions here - I'm stuck right at the beginning - You say - 2.) Replace the following line in your catalog/includes/column_left.php file: REPLACE: include(DIR_WS_BOXES . 'categories.php'); BY: include(DIR_WS_BOXES . 'coolmenu.php'); I don't seem to have the line - include(DIR_WS_BOXES . 'categories.php'); - anyone know what code to change.... here is my includes/column_left.php... <?php /* $Id: column_left.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ $column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location'); while ($column = tep_db_fetch_array($column_query)) { if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) { define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; //cache control side box detect if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) { echo tep_cache_categories_box4(); } else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) { echo tep_cache_manufacturers_box(); } else { require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']); } // end cache control code }else{ define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; require(DIR_WS_BOXES . $column['cfgtitle']); } } ?> where should I change the line code... Sorry to be so dim,, thanks in advance... Quote Link to comment Share on other sites More sharing options...
jsinp Posted September 16, 2005 Share Posted September 16, 2005 I dont know if any one as posted a fix to use coolmenu with all products or not But I figured out a simple fix. in your includes/boxes_content/coolmenu.php change line 30 which says $info_box_contents[] = array('align' => 'left', //'text' => BOX_HEADING_CATEGORIES to //$info_box_contents[] = array('align' => 'left', //'text' => BOX_HEADING_CATEGORIES $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_ALL_PRODUCTS) . '" class="headerNavigation">' . BOX_HEADING_CATEGORIES . '</a><br>' ); This code will restore the link to your all products page at the top of your categories box Hope this helps Quote Link to comment Share on other sites More sharing options...
Guest Posted September 17, 2005 Share Posted September 17, 2005 I installed the coolMenu contribution and it works up to a point. Catagory menus will cascade only one level. No sub-catagories appear in the menu. The demo site which was linked in the instructions works fine and produces sub-catagories properly. I've repeated the instructions 3 times now. Can anyone suggest what to check on this? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 18, 2005 Share Posted September 18, 2005 I installed the coolMenu contribution and it works up to a point. Catagory menus will cascade only one level. No sub-catagories appear in the menu. The demo site which was linked in the instructions works fine and produces sub-catagories properly. I've repeated the instructions 3 times now. Can anyone suggest what to check on this? <{POST_SNAPBACK}> CoolMenu does indeed work properly and displays all sub-catagories. I was expecting products to also be shown. My designer is requesting this feature but with some sub-catagories containing over 100 products, this may not be practical. Does anyone know how to add products to coolMenu? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 19, 2005 Share Posted September 19, 2005 Hi BlueLaredo, I was rather surprised to get a PM off you without your message actually being posted on the forum first! Never mind though, the answer to putting count figures within the coolmenu is already programmed in and is controlled by the "Coolmenu.php" file in the /includes folder of the shop. Change the first programming line from define('SHOW_COUNT','false'); to define('SHOW_COUNT','true'); You can also control the colour and font style of this control by changing the line further down in this file: 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>"; } } Regards Mark. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 19, 2005 Share Posted September 19, 2005 Hi BlueLaredo, I was rather surprised to get a PM off you without your message actually being posted on the forum first! Never mind though, the answer to putting count figures within the coolmenu is already programmed in and is controlled by the "Coolmenu.php" file in the /includes folder of the shop. Change the first programming line from define('SHOW_COUNT','false'); to define('SHOW_COUNT','true'); You can also control the colour and font style of this control by changing the line further down in this file: 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>"; ? } } Regards Mark. <{POST_SNAPBACK}> Thanks, Mark. You anticipated my unasked question on the count color. coolMenu is a very nice effect for our needs, especially when we can customize various aspects. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 19, 2005 Share Posted September 19, 2005 Thanks, Mark. You anticipated my unasked question on the count color. coolMenu is a very nice effect for our needs, especially when we can customize various aspects. <{POST_SNAPBACK}> Well yes it is, but only to a degree. The problem with this contribution is that firstly it is rather outdated now but more to the point, there are so many amendments required to get the thing to work over the most common browsers. The biggest being the fact that the menu is just floated in an absolute position therefore workarounds need to be added to get the x and y co-ordinates to put the thing in the right place. Have a look at a google cached page of a site with this menu on it, bacause you have the google text at the top of the page, the menu is totally in the wrong place because of this absolute positioning. I have actually stopped using it now solely due to this problem. I am now including a retail javascript menu from UDM4.com on my sites instead. It only costs ?32 per licence (based on 2 - 6 licences), the price which is just added to my design costs. This menu, although a bit of a pig to understand the vast amount of configuration options in the first instance, is fully documented and supported and is easy to implement into the site dynamically. It can be placed onto a page with either absolute or container relative positioning, more to the point though, it is search engine friendly, because all of the links are created by using unordered listing hyperlinks. Basicaly, it is so versatile, you just have to see it to believe it. If anyone is interested the url for the menu can be found here: UDM4 Home Page Regards Mark. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 25, 2005 Share Posted September 25, 2005 Hi, I've been trawling though the thread but its a bit heavey going :( . I have installed the menu as per the instructions, but the blank image for the menu does not seem to be forming, and so the menu overlays all the other boxes on the menu system, (Screen shot in link) can anyone give me some pointers to fixing it, as its very frustrating. I have checked all the php files under the cat dir twice and cannot seen any typos. link to screen shot sshot.jpg Its an excellent menu... Thanks in advance Darren Quote Link to comment Share on other sites More sharing options...
trustco Posted September 26, 2005 Share Posted September 26, 2005 does anybody know how to put coolmenu into the header? i have tried positioning it differently in the code, i've done a search, and tried everything i could find in this thread, but nothing. btw, i have the menu horizontal style, with the sub cat's opening just below the main box. :) Quote Link to comment Share on other sites More sharing options...
Guest Posted September 26, 2005 Share Posted September 26, 2005 does anybody know how to put coolmenu into the header? i have tried positioning it differently in the code, i've done a search, and tried everything i could find in this thread, but nothing. btw, i have the menu horizontal style, with the sub cat's opening just below the main box. :) Thats the problem with the coolmenu You have to position it by using the Left and top co-ordinate of the menu. You can not, (or I haven't sussed out how to) put it in a relative position. Mark Hi, I've been trawling though the thread but its a bit heavey going :( . I have installed the menu as per the instructions, but the blank image for the menu does not seem to be forming, and so the menu overlays all the other boxes on the menu system, (Screen shot in link) can anyone give me some pointers to fixing it, as its very frustrating. I have checked all the php files under the cat dir twice and cannot seen any typos. link to screen shot sshot.jpg Its an excellent menu... Thanks in advance Darren I see by the URL, you sorted it then. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 26, 2005 Share Posted September 26, 2005 I see by the URL, you sorted it then. Not quite, I have created a blank image manually, and bypassed the coomenu box creation process. I have come across another problem, When looking at the site via a proxy server (Squid) it does not show the menu. Is this a known problem? may have to put the old one in the background as a fall back. Darren Quote Link to comment Share on other sites More sharing options...
Sid04 Posted October 4, 2005 Share Posted October 4, 2005 Two questions here: 1. Is there a method of adding an "ALL" option at the top of the subcatagories? For example....a customer mouses over your catagories and your subcatogies pop-out......if they want to see ALL of those sub's it would be nice to have that option. Even if you know another contrib that will do this, it would be appreciated. 2. Whats the best method to do the "no java" addon to this contrib(so that if a customer doesnt run javascript, the original menu appears)? My original contrib package has different instructions then the newest contrib(the newest only deals with boxes.php). Thanks! Quote Link to comment Share on other sites More sharing options...
Zoool Posted October 6, 2005 Share Posted October 6, 2005 (edited) Hello First of all i want to congratulate for great contribution. Few days ago i just install osccommerce on my server and first thing i want to do was to install cool menu. I do what is said in install.html but somethings wrong. . I spend few days reading this topic and trying to solve a problem - i read whole topic. I used some advice but they didn't work. Meaby i miss some genius advice - that is propable - i don't know english that good to understand all tehnic things. I will be extreamly happy if someone could help me. I have IE 6. All files are original from package coolmenu 1.2.1. My box class - i dont follow with readme_noJS.txt (from instal.html i understand that just the steps written in install.html are nessesary to coolmenu work fine). My box - boxes.txt. My shop - Swiat-Sportu also i know that is not nessesary to be coolmenu in box category - like here LINK meaby that is hella stupid question - but how to put information and all boxes in left menu little lower? i put normal <br> in the columnleft but then something dizzy happens and then was nothing except header. thanks in advance for help Edited October 6, 2005 by Zoool Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 Hi All, CoolMenu is a great contribution, but for some reason I coudn't make it work in my store. I'm sure it is something very stupid, but I've been trying several hours. What I'm getting is a printout of some javascript sentences in the Categories infobox. In the Categories infobox, it shows: document.write(""); document.write(" <\/TD> <\/TR> "); //--> I'm sure there is an incompatibility between php and javascript, but I can't figure it out. Please help, mtorre Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 Hi All, CoolMenu is a great contribution, but for some reason I coudn't make it work in my store. I'm sure it is something very stupid, but I've been trying several hours. What I'm getting is a printout of some javascript sentences in the Categories infobox. In the Categories infobox, it shows: document.write(""); document.write(" <\/TD> <\/TR> "); //--> I'm sure there is an incompatibility between php and javascript, but I can't figure it out. Please help, mtorre Hi mtorre, Its not an incompatibility, as javascript and php work fantastically together, It looks like there is a problem a few lines earlier where something is missing either telling php to revert back to html or telling the html that the next commands are javascript. post the full file and I'll have a quick look for you. Mark. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 Hi mtorre, Its not an incompatibility, as javascript and php work fantastically together, It looks like there is a problem a few lines earlier where something is missing either telling php to revert back to html or telling the html that the next commands are javascript. post the full file and I'll have a quick look for you. Mark. Dear marcoh, Thanks for your reply. I am attaching the includes/boxes/coolmenu.php, just like I downloaded from the contrubution: --------------- begin of file -------------------------- <?php /* ------------------------------------------------ coolMenu for osCommerce author: Andreas Kothe url: http://www.oddbyte.de copyright: 2003 Andreas Kothe modified: 2003-07-28 Marc Zacher extended to work for javascript enanbled and disabled with javascript disabled, the conventional categories box is shown this extension is provided by Marc Zacher The copyright notice of Andreas Kothe in the html output has been removed and put in this header since it would cause problems in javascript context. Released under the GNU General Public License ------------------------------------------------ */ ?> <script type="text/javascript"> <!-- document.write(" <TR> <TD> "); <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); $coolmenuinfoboxheading = new infoBoxHeading($info_box_contents, true, false, false, false); $output_string = $coolmenuinfoboxheading->table_string; $info_box_contents = array(); if (MAX_MANUFACTURERS_LIST < 2) { $cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE)); } else { $cat_choose = ''; } $info_box_contents[] = array('text' => ' <img src="images/trans.gif" width="150" height="' . $height . '">'); $coolmenuinfobox = new infoBox($info_box_contents, false); $output_string .= $coolmenuinfobox->table_string; //remove all html commments $output_string = preg_replace("/<!--.*?-->/", "", $output_string); //escape all occurences of " $output_string = preg_replace('/"/', '\"', $output_string); //escape all occurences of / $output_string = preg_replace('/\//', '\/', $output_string); //remove trailing \n $output_string = preg_replace('/\\n+$/', '', $output_string); //replace all \n with ");\ndocument.write(" $output_string = preg_replace('/\\n/', "\");\ndocument.write(\"", $output_string); //prepend document.write at the beginning and append ");\n $output_string = "document.write(\"" . $output_string . "\");\n"; echo $output_string; ?> document.write(" <\/TD> <\/TR> "); //--> </script> <noscript> <?php include(DIR_WS_BOXES . 'categories.php'); ?> </noscript> --------------- end of file -------------------------- Quote Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2005 Share Posted October 6, 2005 Dear marcoh, Thanks for your reply. I am attaching the includes/boxes/coolmenu.php, just like I downloaded from the contrubution: Mtorre, I've sent you a pm. Mark. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.