Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

coolMenu


Keyser Soze

Recommended Posts

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.

 

Hi Mark,

 

On my previous incarnation of my site I used the UDM4 menu(LOVE IT)...but since implementing osc I thought I couldn't use it anymore.

 

How did you get udm4 to integrate with osc?

 

Sheri

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

how to identify subcategories ? Its needed what script could count table height without mistake automatikaly. It would be great to make working good this option. Someone can help ?

 

$height.= 2.65*count($categories)

Link to comment
Share on other sites

Hi Mark,

 

On my previous incarnation of my site I used the UDM4 menu(LOVE IT)...but since implementing osc I thought I couldn't use it anymore.

 

How did you get udm4 to integrate with osc?

 

Sheri

 

Hi Sheri,

 

Its a little hard to say how I integrated it as my category structuring and facilities is nothing like the basic oscommerce, so just forwarding you a couple of my files will not work.

 

I'll see if I can sort out a script that can crawl through the normal categories structure for you as soon as I get a chance.

 

Regards

Mark.

Link to comment
Share on other sites

Hi Sheri,

 

Its a little hard to say how I integrated it as my category structuring and facilities is nothing like the basic oscommerce, so just forwarding you a couple of my files will not work.

 

I'll see if I can sort out a script that can crawl through the normal categories structure for you as soon as I get a chance.

 

Regards

Mark.

 

Thank you Mark. That would be fabulous. B) Would **love** to use udm. It offers so much control over the display of the menu.

 

Best,

Sheri

Link to comment
Share on other sites

Thank you Mark. That would be fabulous. B) Would **love** to use udm. It offers so much control over the display of the menu.

 

Best,

Sheri

 

 

Hi Sheri,

 

Ive sent you a pm with the required code in it.

 

Regards

Mark.

Link to comment
Share on other sites

  • 2 weeks later...
Hi Mark,

 

Would it be possible to publish that script here?

 

cheers, Simon B

 

Hi Simon.

 

The menu is not open-source. You will therefore need to go to the udm4.com and purchase / install as per their instructions.

 

 

The following script will create the necessary unordered list for the menu.

 

CREATE A NEW FILE includes/boxes/udm-menu.php AND COPY THE FOLLOWING SOURCE INTO IT.

 

<?php

function tep_get_nav_tree($parent_id = '0', $spacing = '', $ending = '', $category_tree_array = '', $loopcount = '', $extra_line='', $pref='') {
global $languages_id, $current_category_id;

$categories_query_raw = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and c.parent_id = '" . (int)$parent_id . "' order by c.sort_order";

// first of all check for records
if (tep_db_num_rows(tep_db_query($categories_query_raw)) > 0) {

if (!$spacing){
$category_tree_array.='<ul id="udm" class="udm">' . "\n"; // create initial block requires id
$spacing = "yes";
$loopcount = 1;
}else{
$category_tree_array.= "\n" . ' <ul>' . "\n"; // create blocks thereafter
if ($extra_line){
$category_tree_array .= $extra_line;
$extra_line ='';
}

$loopcount ++; 
}


$categories_query = tep_db_query($categories_query_raw);

while ($categories = tep_db_fetch_array($categories_query)) {

// loop for sub-categories.
$count_query_raw = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and c.parent_id = '" . (int)$categories['categories_id'] . "' order by c.sort_order";


if (tep_db_num_rows(tep_db_query($count_query_raw)) > 0) {
// we have submenu, so don't close the line yet. look for sub menus.
$extra_line ='';
$category_tree_array .= ' <li><a href="' .tep_href_link(FILENAME_DEFAULT, 'cPath=' . $categories['categories_id']) . '">' . $categories['categories_name'] . '</a>';
$ending ='</li>';


$category_tree_array = tep_get_nav_tree($categories['categories_id'], $spacing, $ending, $category_tree_array, $loopcount, $extra_line, $pref . '');

}else{
// there are no submenus
// decide reference depending on category type and echo results.

$calculated_link = FILENAME_DEFAULT;
$calculated_parameters = 'cPath=' . $categories['categories_id'];
$category_tree_array .= ' <li><a href="' . tep_href_link($calculated_link, $calculated_parameters) . '">' . $pref . $categories['categories_name'] . '</a></li>' . "\n";

}

}

if ($loopcount >1){
$category_tree_array.= '</ul>' . $ending . "\n"; // end block
$ending = '';
}else{
$category_tree_array.= '</ul>' . "\n"; // end block
}
}



return $category_tree_array;
}
?>








<!-- categories //-->

<tr>
<td class="leftMenu">
<?php
echo tep_get_nav_tree();
?>
</td>
</tr>

 

 

All you need to do then is to add this new file. udm-menu.php to your column_left file.

 

ie.

include(DIR_WS_BOXES . 'udm-menu.php');

 

 

You may have to change the last few lines of that code <td class="leftMenu" etc... to the format of other boxes within the includes.

 

As always, BACKUP EVERYTHING FIRST, this script should work ok, however, like I said in an earlier post, my category structures is nothing like the originals.

 

I've therefore butchered my script somewhat to create this and I have not really been able to test it fully.

 

Hopefully, it will work for you.

 

A note to everyone using this posting, remember the menu is not free, the developers have done some great work, make sure you appreciate it by purchasing their licence.

 

Regards

 

Mark.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

How do i disable categories within coolmenu that effect all menus, default/dhtml and coolmenu?

 

I want to disable category 46 and 47 from displaying in my menus??

 

 

Can anyone help?

Link to comment
Share on other sites

Hi all,

Forget the last post....got it going now....

cheers,

 

hi could you tell me how you fixed the problem of the menu sitting on top of the original menu as i am having this difficulty...

 

Daniel

Link to comment
Share on other sites

Hi,

 

I installed this menu thing but it doesnt seem to work correctly for me, what happens is the menu is totally the wrong size, the height that is. so it over laps onto the next info box below.

 

menu.JPG

 

Also i tried editing the colours of it in the style sheet but nothing changes. so i think the menu cant find the style sheet.

 

Can someone please tell me how i can fix this issue.

 

Thanks.

Link to comment
Share on other sites

never mind, after carefully looking thro all these pages, i realised that some of the scripts used here are different from the oone i used. it seems that the latest version of this contribution doesnt work correctly.

 

Dont use version 1.2.1

Use version 1.2

 

Thanks.

Link to comment
Share on other sites

New question with regards to this con:

 

I’ve installed a contribution named Article Manager http://www.oscommerce.com/community/contri...ll/search,tpath into my site, but the layout of the navigation looks a little untidy and unintuitive for the user that navigates around my site. So I decided I to install a contribution (listed below) to reformat the way the navigation appears within the site. I painstakingly attempted to convert the information from \includes\boxes\categories.php into \includes\boxes\articles.php, but to no avail!

---------------------------------------------------------

Example 1

Description: I’d like the navigation to appear in the same position as this contribution!

 

OsC contribution: http://www.oscommerce.com/community/contri...all/search,menu

Example site: http://www.ciraoptika.cz/-----------------...---------------

Example 2

Description: I'll like to use the CSS that have been set-up in this contribution!

 

OsC contribution: http://www.oscommerce.com/community/contri...all/search,menu

Example site: http://www.geraeteland.de-----------------...---------------

 

Now I've got this to appear using they "article manager" My Webpage,and all the links are working and going to the correct section, but none of the content stored within the database is showing up in any of the sections!

 

I hope you can help in giving me a little guidance to get this working!

Edited by salt
Link to comment
Share on other sites

never mind, after carefully looking thro all these pages, i realised that some of the scripts used here are different from the oone i used. it seems that the latest version of this contribution doesnt work correctly.

 

Dont use version 1.2.1

Use version 1.2

 

Thanks.

 

 

Did 1.2 fix the size issue?

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

 

I'm considering installing this contribution, but i was wondering if the menu can only be used when the categories box is on the left hand side, i have mine positioned on the right for a specific reason, so would like the sub menu's to pan out to the left rather than the right, if that makes sense.

 

Best Regards

 

Donna

Link to comment
Share on other sites

Well, I?m sorry for not being too original. Guess I am the 158473045th member in posting the same kind of problem with the CoolMenu. But since I love how it looks and since I saw everybody get to fix the problems I ask for the kind help of this forum.

 

I followed aaaall the steps in the contribution :sweating: and got the CoolMenu here, looking ALMOST perfect. After reading for hours the different postings I could (partly) manage to position it within the borders, aligned with (what I suppose are-still-there) the other boxes on the left menu (but I don?t know how it may look in other browsers than IE though). I could change the menu width and the rows height but I still have two problems: the menu just hovers over the other existing boxes in column left, and it has no header.

 

In /includes/coolmenu.php I messed with the number:

 

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

 

trying to get something that fits as T_love advised.

 

I tried also changing in includes/boxes_content/coolmenu.php

 

$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>'

);

 

as I read in a posting that this could fix the position problem. Nothing happens, the menu is just stuck there.

 

I uploaded it in a test catalogue version I have in my hard disk, so I can?t post my URL here.

 

I would immensely appreciate any help to get it working!

Link to comment
Share on other sites

hello all,

 

I have just a question, how does coolMenu recover information from TABLE_CATEGORIES and TABLE_CATEGORIES_DESCRIPTION ??

 

I did not see any sql request ?? I would like to carry out a modification, but I does not understand how the menu recovers information .

 

Best regards

Link to comment
Share on other sites

hello all,

 

I have just a question, how does coolMenu recover information from TABLE_CATEGORIES and TABLE_CATEGORIES_DESCRIPTION ??

 

I did not see any sql request ?? I would like to carry out a modification, but I does not understand how the menu recovers information .

 

Best regards

 

Hi Paul,

 

The coolmenu.php in the /includes folder is the one that does all the work creating the menu.

 

The SQL commands however, are controlled by the function tep_get_categories in the includes/functions/general.php file.

 

Mark.

Link to comment
Share on other sites

  • 2 weeks later...

(Sorry for this cross-post, the 1st ended in the wrong thread... it would be great to have

one Forum per Contribution (as usual) and not one Forum for all Contributions...)

 

Where is the best Place to Enable/Disable Coolmenu?

 

Good evening

 

I tried all the day to create a contribution to enable / disable Coolmenu

in the Admin's Configuration.

I will have more than 1 OCS-Shop and some of them should not use Coolmenu,

others should use it... and I prefer to have one version of my souce-code....

 

Does someone knows where's the best place to enable / disable Coolmenu?

 

In all of my root-PHP-Files (e.g. account.php) I have added:

 

<?php 
if (COOLMENU_DISPLAY == 'true') { 
 echo '<script language="javascript" src="includes/includes.js"></script>';
} 
?>

(COOLMENU_DISPLAY is a new option in the Admins-Config-Pannel).

 

Thanks for any hint in advance!,

Kind regards,

Thomas

Edited by schittli
Link to comment
Share on other sites

(Sorry for this cross-post, the 1st ended in the wrong thread... it would be great to have

one Forum per Contribution (as usual) and not one Forum for all Contributions...)

 

Where is the best Place to Enable/Disable Coolmenu?

 

Good evening

 

I tried all the day to create a contribution to enable / disable Coolmenu

in the Admin's Configuration.

I will have more than 1 OCS-Shop and some of them should not use Coolmenu,

others should use it... and I prefer to have one version of my souce-code....

 

Does someone knows where's the best place to enable / disable Coolmenu?

 

In all of my root-PHP-Files (e.g. account.php) I have added:

 

<?php 
if (COOLMENU_DISPLAY == 'true') { 
 echo '<script language="javascript" src="includes/includes.js"></script>';
} 
?>

(COOLMENU_DISPLAY is a new option in the Admins-Config-Pannel).

 

Thanks for any hint in advance!,

Kind regards,

Thomas

 

If you already have an admin configuration setup, then just use the same variable to swap between the menu type boxes from the includes/column_left.php file.

 

ie.

 

if (COOLMENU_DISPLAY == 'true') { 
include(DIR_WS_BOXES . 'coolmenu.php');
}else{
include(DIR_WS_BOXES . 'categories.php');
}

 

Mark

Link to comment
Share on other sites

I was struggling to get this great menu system working the way I want it to and was wondering if anybody has tried to do this before.......

 

In my header I have some static links, one of which is called "products". When the user mouseover this link I want my coolmenu to appear underneath. I've tried using a hidden Div and things kind of work up to a point. but I've having glitchy problems - hiding the menu after mouseout etc.....

 

Anybody else tried and achieved this cause its driving me nuts!!!!!

 

 

 

And quickly a second question..... I'm using the contribution "Information Pages Unlimited" to handle the info box and I'm hoping to integrate coolmenu into that to display my info box under a static link in the header "Information". Can these two contributions work together?

 

 

Thanks in advance people!!!

Link to comment
Share on other sites

Hi,

 

Im using coolmenu contrib with the DHTML menu.

 

My problem is that search engines cannot index the dhtml category menu. Ive read you can add <noscript> tags and put the links in there.

 

ANy one know how i can do this?

Link to comment
Share on other sites

  • 2 weeks later...
Hi,

 

I have installed the cool menu and had lots of problems with it initially and have been trying to get it to automatically move the menu when you have a centered shop -rather then a static fixed width shop.

 

I have finally got a working version that i have tested with Netscape 7.1, IE 6.0, Safari 2.0.3, IE5.2.3 Mac, Opera 7.23 (windows). I havent got it to work with Netscape 4.7 though.

 

I changed the order of the includes so that the includes\coolmenu.php is the last thing in each page

before the body. This seems to allow it to get the coordinates of the div tag... if its before the end, then some browsers still work but IE6 didnt... and it doesnt seem t break anything else having at the bottom.

 

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

 

I added a DIV tag in my includes\boxes\coolmenu.php before the script, I also have a few table tags in there as i dont use the standard header text to generate the header of the categories menu:

You will need to modify the width and height to fit your menu size i think

<div id="menuloc1" style="position:relative; width:140px; height:80px; background=#FFFFFF; "></div>

 

the DIV ID is used as the placeholder and is passed to another javascript i found from

 

http://www.walterzorn.com/dragdrop/dragdrop_e.htm

 

donation button on his website if this works for you.

 

each of my pages now has the following after the body tag:

<body>
<script type="text/javascript" src="js/wz_dragdrop.js"></script>

obviously you will need to download the js file and then upload to your server and change the location as you wish.

 

and i modified the includes\coolmenu.php using the new js functions in the wz_dragdrop.js as follows:

 

near the top of this file within the script tags:

								// the set_dhtml passes the layer name to the code - could be an image name too
				SET_DHTML("menuloc1");
							// get the info about this object
	o= dd.elements['menuloc1'];
							oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname
						   //get the element location coordiinates - cross browser compatible-ish
	oCMenu.fromLeft=o.x
	oCMenu.fromTop=o.y
						   // recalculate the coordinates after window resize
							oCMenu.onresize="location.reload()"
// rest of code still the same below..

 

I guess the location.reload could be removed if you have a fixed size site and it should still work properly, although you wouldnt need it..

 

And thats it..

Any other browsers i should test this on ? I may have an old version of gecko around

 

If it works for you then i guess it could be included in the cool menu contrib. I nearly gave up on this but am very happy it finally works ! Need some sleep now!

:blink:

 

I have a fixed width centered shop and I can't seem to get it into the catagories box. I tried this fix without the additional js and it still resides in the upper left corner.

 

Any help?

 

Dave V

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