Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Dynamenu" for osCommerce


Recommended Posts

Hey, still no reply to my question, so maybe let me ask it like this: has anybody seen dynamenu working like I want it to behave (see quote below)?

 

If not I guess I will try to use another menu...and if you have suggestions as to what other menu to use to achieve my goal, i'm listening ;)

 

 

I want that when I click on a sucategory and it moves to that subcategory page, the menu actually expands to show all the subcategories of this category and stays expanded (like in the basic osC menu, not in the fly-out style), while the other categories are still fly out menus (and the subcategories of those subcategories too). I thought this might be in the configuration at the beginning of dm_categories.php but actually nothing gave this result....also couldn't find anything on the forum. Any help is appreciated!

 

Link to comment
Share on other sites

I do have that code at the bottom of both of those files, but is it possible I've placed it wrongly or something?

 

 

I hope this is not the way you have it like it is listed in your reply:

// Output the footer for Dynamenu for osCommercecho $GLOBALS

['dmfooter'];

 

It is hard to tell what is wrong since I dont know your configuration of Dynamenu.

 

But as I can see from your source (mouce right click and click "View Source") Dynamenu is not present as it should.

 

Find this line in your index.php or your template index file:

<div id="website_name">Out Beyond The Dune Sea</div>

Try to remove the closing div tag (</div>) and see if something happens...

Link to comment
Share on other sites

It did look like that, but I'd only just done that (I have tried coipying and pasting a number of variations of the code) It now looks like this: (Is this still wrong?)

 

?>

<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

}

// START STS 4.1

}

// END STS 4.1

// Output the footer for Dynamenu for osCommerce

echo $GLOBALS['dmfooter'];

?>

 

 

It is hard to tell what is wrong since I dont know your configuration of Dynamenu.

 

This is my dm_categories file:

 

<?php

/*

$Id: dm_categories.php,v 1.00 2006/05/07 01:13:58 nate_02631 Exp $

 

Ties the store category menu into the PHP Layers Menu library, allowing display

of categories as DTHML drop-down or fly-out menus, collapsable tree-style menus

or horizontal/vertical indented plain menus.

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2006 Nate Welch http://www.natewelch.com

 

Released under the GNU General Public License

*/

 

// BEGIN Configuration Options

 

// Set the value below corresponding to the type of menu you want to render

// 0 = Horizontal Drop-down; 1 = Vertical Flyout; 2 = Tree Menu;

// 3 = Plain Horizontal Menu; 4 = Plain Vertical Menu

// Include the appropriate stylesheet in your store stylesheet, and if rendering

// types '0' or '1', you must also echo (output) the "menu footer" variable

// in your store footer as described in the readme (or submenus won't work)

$menu_type = 1;

 

// Set to false to display the menu output only. Set to true to display in

// a regular box. The former is useful for better integrating the menu with your layout.

$show_dmcats_as_box = true;

 

// Set to 'true' to assign TITLE tags to each of the menu's items, 'false' to leave blank

$menu_use_titles = true;

 

// Name of the icon file to be used preceding menu items. Leave blank for no icons.

// NOTE: Does not apply to plain style menus. Icon should be in the /images directory

$menu_icon_file = '';

 

// Width and height of icons used in menus (does not apply to plain menus).

$menu_icon_width = 16;

$menu_icon_height = 16;

 

// Set the graphic to be used for the forward arrow and down arrow images used in

// drop-down and fly-out menus. Images must reside in your catalog's /images directory

$menu_fwdarrowimg = 'forward-arrow.png';

$menu_downarrowimg = 'down-arrow.png';

 

// Indicates whether or not to render your entire category list or just the root categories

// and the currently selected submenu tree. Rendering the full list is useful for dynamic menu

// generation where you want the user to have instant access to all categories. The other option

// is the default oSC behaviour, when the subcats aren't available until the parent is clicked,

// more suitable for plain-style menus

$show_full_tree = true;

 

// For tree menus, set to true to have only nodes corresponding to the current category path

// expanded. If set to false, the tree menu will retain expanded/collapse nodes the user has

// selected (as well as expanding any for categories they've entered)

$menu_tree_current_path = true;

 

// Set the three numerical values below to adjust the offset of submenus in

// horizontal drop-down and vertical fly-out menus. Values adjust the following (in order)

// Top Offset: # of pixels from top border of previous menu the submenu appears

// Right Offset: # of pixels from right border of previous menu the submenu appears

// Left Offset: # of pixels from left border of previous menu the submenu appears

// if the submenu pops to left (i.e. if window border is reached). Negative values are allowed.

$menu_layer_offset = array (0,4,4);

 

// Show icons on tree menus? If set to false, only expand/collapse icons and connecting lines are shown

$GLOBALS['dm_tree_folder_icons'] = true;

 

// This is the HTML that you would like to appear before/after your categories menu if *not*

// displaying in a standard "box". This is useful for reconciling tables or clearing

// floats, depending on your layout needs. For example if not including in a box in the

// default osC template, you would need opening/closing <tr><td> tags...

$before_nobox_html = '';

$after_nobox_html = '';

 

// Use this option if you have a *lot* of subcategories in a DHTML style menu and your

// submenus won't fit on the page. Set $divide_subcats to the max # of subcategories you want

// to display. The menu will show a "more..." link and display the remaining subcategories

// under that selection. Leave at "0" to not divide your subcategories.

$divide_subcats = 0;

 

// The text you want to display to indicate more subcategories are available

// This can be set a string or to a language constant you define.

$divide_subcats_text = 'more...';

 

// END Configuration Options

 

 

// Misc setting to make folder icon clickable to expand tree menu nodes

$GLOBALS['dm_tree_titleclick'] = true;

 

// Initialize HTML and info_box class if displaying inside a box

if ($show_dmcats_as_box) {

echo '<tr><td>';

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

new infoBoxHeading($info_box_contents, true, false);

}

 

// Generate the menu data output (uses configuration options above)

$categories_string = tep_make_cat_dmlist();

 

// Include required libraries based on menu type

require_once 'includes/functions/dynamenu/lib/PHPLIB.php';

require_once 'includes/functions/dynamenu/lib/layersmenu-common.inc.php';

 

if ($menu_type < 2) { // Setup for DHTML style menus

 

?>

<script language="JavaScript" type="text/javascript">

<!--

<?php require_once 'includes/functions/dynamenu/libjs/layersmenu-browser_detection.js'; ?>

// -->

</script>

<script language="JavaScript" type="text/javascript" src="includes/functions/dynamenu/libjs/layersmenu-library.js"></script>

<script language="JavaScript" type="text/javascript" src="includes/functions/dynamenu/libjs/layersmenu.js"></script>

<?php

 

require_once 'includes/functions/dynamenu/lib/layersmenu.inc.php';

$mid = new LayersMenu($menu_layer_offset[0],$menu_layer_offset[1],$menu_layer_offset[2],1);

 

} elseif ($menu_type > 2) { // Setup for plain style menus

 

require_once 'includes/functions/dynamenu/lib/plainmenu.inc.php';

$mid = new PlainMenu();

 

} else { // Setup for tree style menus

 

?>

<script language="JavaScript" type="text/javascript">

<!--

<?php require_once 'includes/functions/dynamenu/libjs/layersmenu-browser_detection.js'; ?>

 

<?php

 

if ($menu_tree_current_path) {

echo "\n".'var menu_tree_current_path = true';

} else {

echo "\n".'var menu_tree_current_path = false';

}

 

?>

// -->

</script>

<script language="JavaScript" type="text/javascript" src="includes/functions/dynamenu/libjs/layerstreemenu-cookies.js"></script>

<?php

 

require_once 'includes/functions/dynamenu/lib/treemenu.inc.php';

$mid = new TreeMenu();

 

}

 

// Set menu config variables

$mid->setDirroot('./');

$mid->setLibjsdir('./includes/functions/dynamenu/libjs/');

 

if ($menu_type !=2) {

$mid->setTpldir('./includes/functions/dynamenu/templates/');

}

 

$mid->setImgdir('./images/');

$mid->setImgwww('images/');

$mid->setIcondir('./images/');

$mid->setIconwww('images/');

$mid->setIconsize($menu_icon_width, $menu_icon_height);

 

// Generate menus

$mid->setMenuStructureString($categories_string);

$mid->parseStructureForMenu('catmenu');

 

switch ($menu_type) {

case 0: // Horizontal drop-down

$mid->setDownArrowImg($menu_downarrowimg);

$mid->setForwardArrowImg($menu_fwdarrowimg);

$mid->setHorizontalMenuTpl('layersmenu-horizontal_menu.ihtml');

$mid->setSubMenuTpl('layersmenu-horiz_sub_menu.ihtml');

$mid->newHorizontalMenu('catmenu');

$mid->printHeader();

$categories_menu = $mid->getMenu('catmenu');

$GLOBALS['dmfooter'] = $mid->getFooter();

break;

case 1: // Vertical fly-out

$mid->setDownArrowImg($menu_downarrowimg);

$mid->setForwardArrowImg($menu_fwdarrowimg);

$mid->setVerticalMenuTpl('layersmenu-vertical_menu.ihtml');

$mid->setSubMenuTpl('layersmenu-vert_sub_menu.ihtml');

$mid->newVerticalMenu('catmenu');

$mid->printHeader();

$categories_menu = $mid->getMenu('catmenu');

$GLOBALS['dmfooter'] = $mid->getFooter();

break;

case 2: // Tree menu

$categories_menu = $mid->newTreeMenu('catmenu');

break;

case 3: // Horizontal plain menu

$mid->setPlainMenuTpl('layersmenu-horizontal_plain_menu.ihtml');

$categories_menu = $mid->newHorizontalPlainMenu('catmenu');

break;

case 4: // Vertical plain menu

$mid->setPlainMenuTpl('layersmenu-plain_menu.ihtml');

$categories_menu = $mid->newPlainMenu('catmenu');

break;

}

 

 

// Output list inside a box if specified, otherwise just output unordered list

if ($show_dmcats_as_box) {

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_menu);

new infoBox($info_box_contents);

echo '</td></tr>';

} else {

echo $before_nobox_html;

echo $categories_menu;

echo $after_nobox_html;

}

 

// Create the root category list

function tep_make_cat_dmlist($rootcatid = 0, $maxlevel = 0){

 

global $cPath_array, $show_full_tree, $languages_id;

 

global $idname_for_menu, $cPath_array, $show_full_tree, $languages_id;

 

// Modify category query if not fetching all categories (limit to root cats and selected subcat tree)

if (!$show_full_tree) {

$parent_query = 'AND (c.parent_id = "0"';

 

if (isset($cPath_array)) {

 

$cPath_array_temp = $cPath_array;

 

foreach($cPath_array_temp AS $key => $value) {

$parent_query .= ' OR c.parent_id = "'.$value.'"';

}

 

unset($cPath_array_temp);

}

 

$parent_query .= ')';

} else {

$parent_query = '';

}

 

$result = tep_db_query('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 cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name');

 

while ($row = tep_db_fetch_array($result)) {

$table[$row['parent_id']][$row['categories_id']] = $row['categories_name'];

}

 

$output .= tep_make_cat_dmbranch($rootcatid, $table, 0, $maxlevel);

 

return $output;

}

 

// Create the branches off the category list

function tep_make_cat_dmbranch($parcat, $table, $level, $maxlevel) {

 

global $cPath_array, $menu_use_titles, $menu_icon_file, $divide_subcats, $divide_subcats_text;

 

$lvl_adjust = 1;

 

$list = $table[$parcat];

 

// Build data for menu

while(list($key,$val) = each($list)){

 

if (isset($cPath_array) && in_array($key, $cPath_array)) {

$this_expanded = '1';

$this_selected = 'dmselected';

} else {

$this_expanded = '';

$this_selected = '';

}

 

if (!$level) {

unset($GLOBALS['cPath_set']);

$GLOBALS['cPath_set'][0] = $key;

$cPath_new = 'cPath=' . $key;

 

} else {

$GLOBALS['cPath_set'][$level] = $key;

$cPath_new = 'cPath=' . implode("_", array_slice($GLOBALS['cPath_set'], 0, ($level+1)));

 

$this_subcat_count++;

}

 

if ($menu_use_titles) {

$this_title = $val;

} else {

$this_title = '';

}

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($key);

if ($products_in_category > 0) {

$val .= ' (' . $products_in_category . ')';

}

}

 

// Output for file to be parsed by PHP Layers Menu

// Each line (terminated by a newline "\n" is a pipe delimited string with the following fields:

// [dots]|[text]|[link]|[title]|[icon]|[target]|[expanded]

// dots - number of dots signifies the level of the link '.' root level items, '..' first submenu, etc....

// text - text for link; title - tooltip for link; icon - icon for link; target - "dmselected" CSS class if item is selected

// expanded - signifies if the node is expanded or collapsed by default (applies only to tree style menus)

 

// Add "more" submenu if dividing subcategories

if ($this_subcat_count > $divide_subcats && $divide_subcats) {

$output .= str_repeat(".", $level+$lvl_adjust).'|'.$divide_subcats_text.'||'.$this_title.'|'.$menu_icon_file.'|'.$this_selected.'|'.$this_expanded."\n";

$this_subcat_count = 1;

$lvl_adjust ++;

}

 

$output .= str_repeat(".", $level+$lvl_adjust).'|'.$val.'|'.tep_href_link(FILENAME_DEFAULT, $cPath_new).'|'.$this_title.'|'.$menu_icon_file.'|'.$this_selected.'|'.$this_expanded."\n";

 

 

if ((isset($table[$key])) AND (($maxlevel > $level + 1) OR ($maxlevel == '0'))) {

$output .= tep_make_cat_dmbranch($key,$table,$level + $lvl_adjust,$maxlevel);

}

 

} // End while loop

 

return $output;

}

 

?>

 

 

Find this line in your index.php or your template index file:

<div id="website_name">Out Beyond The Dune Sea</div>

Try to remove the closing div tag (</div>) and see if something happens...

 

I couldn't find this line in my index.php file and the template folder doesn't have an index file. My includes/modules/sts folder has a file called sts_index.php but that doesn't have that line either (I tried using the edit/find... function to be sure but could find no reference to the website name at all.) I know I'm doing something wrong and probably being iincredibly stupid, but I'm not worries about my pride, I just want to figure out how to make it work.

 

Thanks again for taking the time to help. It means a lot.

 

Best Wishes,

 

Tom

Link to comment
Share on other sites

It did look like that, but I'd only just done that (I have tried coipying and pasting a number of variations of the code) It now looks like this: (Is this still wrong?)

Looks ok now.. And now the rest of the Dynamenu code (That I said was missing) is listed in your source..

 

I couldn't find this line in my index.php file and the template folder doesn't have an index file. My includes/modules/sts folder has a file called sts_index.php but that doesn't have that line either (I tried using the edit/find... function to be sure but could find no reference to the website name at all.) I know I'm doing something wrong and probably being iincredibly stupid, but I'm not worries about my pride, I just want to figure out how to make it work.

 

If you dont have a grep program then download one and search for website_name in all your .php .htm .html files, then you should find it..

 

btw: your dm_categories.php file looks ok for now..

 

Link to comment
Share on other sites

Hi Sijo,

 

Cool thanks! I just downloaded the grep program and that worked.

 

I found this line in my sts_template.html file:

 

<div id="website_name"><?php echo STORE_NAME; ?></div>

 

and this in my template stylesheet:

 

div#website_name {

 

z-index: 8;

 

position: absolute;

 

top: 0px;

 

color: #000000;

 

text-align: right;

 

width: 800px;

 

top: 240px;

 

left: 50%;

 

margin-left: -350px;

 

font-size: 8px;

 

letter-spacing: 1.5px;

 

}

 

Should I remove the </div> from the end of:

 

<div id="website_name"><?php echo STORE_NAME; ?></div>

 

Thanks aain,

 

Tom

 

Looks ok now.. And now the rest of the Dynamenu code (That I said was missing) is listed in your source..

 

 

 

If you dont have a grep program then download one and search for website_name in all your .php .htm .html files, then you should find it..

 

btw: your dm_categories.php file looks ok for now..

 

Link to comment
Share on other sites

Hi Sijo,

 

Whoah! Progress!!

 

Ok I removed the </div> and now when I hover over the menu the subcategory boxes appear but they are floating out in the middle of the page.

 

Is this something I can remedy in the styleshhet or in dm_categories.php?

 

I am just so happy to have made some progress. You are awesome!! How did you know to remove the </div> tag and why did that work?

 

Thanks so, so much!!!!

 

My very best wishes,

 

Tom

 

 

Yes, try to remove it to see if it make any changes to your menu..

Link to comment
Share on other sites

Whoah! Progress!!

 

Ok I removed the </div> and now when I hover over the menu the subcategory boxes appear but they are floating out in the middle of the page.

Is this something I can remedy in the styleshhet or in dm_categories.php?

 

Glad you made it..wink.gif

You can play with this in dm_categories.php :

$menu_layer_offset = array (0,4,4);

I'm using (-42,4,4) on my site.

 

You can also try this:

Put the </div> closing tag back where it was and put this line under like this:

<div id="website_name"><?php echo STORE_NAME; ?></div>
<div id="menu_test">

Then in your stylesheet put this:

div#menu_test {  
z-index: 8;
position: absolute;
top: 40px;
}

This is what I have done here

 

I am just so happy to have made some progress. You are awesome!! How did you know to remove the </div> tag and why did that work?

 

When I installed Dynamenu on my site months back, I used hours of testing before I did find this solution thumbsup.gif

Link to comment
Share on other sites

Hi Sijo,

 

Thanks so much! That's worked perfectly. The flyout is working and the boxes are positioned correctly.

 

I don't know how you solved this problem, but I'm incredibly thankful that you did.

 

I am extremely grateful for all your help - You're a legend! :)

 

Many, many thanks and my very best wishes,

 

Tom

 

Glad you made it..wink.gif

You can play with this in dm_categories.php :

$menu_layer_offset = array (0,4,4);

I'm using (-42,4,4) on my site.

 

You can also try this:

Put the </div> closing tag back where it was and put this line under like this:

<div id="website_name"><?php echo STORE_NAME; ?></div>
<div id="menu_test">

Then in your stylesheet put this:

div#menu_test {  
z-index: 8;
position: absolute;
top: 40px;
}

This is what I have done here

 

 

 

When I installed Dynamenu on my site months back, I used hours of testing before I did find this solution thumbsup.gif

Link to comment
Share on other sites

Hi Sijo,

 

Thanks so much! That's worked perfectly. The flyout is working and the boxes are positioned correctly.

 

I don't know how you solved this problem, but I'm incredibly thankful that you did.

I am extremely grateful for all your help - You're a legend! smile.gif

 

Many, many thanks and my very best wishes,

 

You are welcome! Glad I could help thumbsup.gif

Link to comment
Share on other sites

Hi SIJO

 

I am looking myself crazy for the double // but i can not find them , i also found more instances of the // thing , so something obviously is wrong here.

 

 

And now Discobob83 says he has this in his sts-templates.html:

 

<div id="website_name"><?php echo STORE_NAME; ?></div>

 

wich i also not seem to have.

Do these things relate to each other ??

 

Gr, Rob

 

 

 

 

ps, to work on and compare files i have UltraEdit.

Link to comment
Share on other sites

Hi SIJO

 

I am looking myself crazy for the double // but i can not find them , i also found more instances of the // thing , so something obviously is wrong here.

Since I dont have your source, I cant tell you where it is. You have to search your files for keywords to find it..

Also look in your catalog/includes/configure.php file..

 

And now Discobob83 says he has this in his sts-templates.html:

 

<div id="website_name"><?php echo STORE_NAME; ?></div>

 

wich i also not seem to have.

 

Again, search your files for website_name ..

(Your Dynamenu is working so you dont really need to search for it..)

Edited by sijo
Link to comment
Share on other sites

I'm only using the Vertical Fly-Out part in my CSS and it only uses .dmselected and .verbar .dmselected at the end. Could there be something from the OSC part of the CSS overriding this font color? Thank you for your help, I definitely appreciate it!

Not sure if you've solved this issue yet, but i've found a solution.

 

For all those not able to get the .dmselected class working, you need to set the class to work on a link, so:

 

.dmselected a {}

 

This worked for me anyway, after pulling out most of my hair...

 

Cheers,

Dave

Link to comment
Share on other sites

Hello: Apologies if this has been discussed already.I have two levels hierarchy. I would like to show the first level in bold. This is what it looks like now.

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

Woolen

Jackets

Hats

Mittens

Cotton

Shirts

Jackets

Full T-Shirts

 

I want it to look like this:

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

CATALOG

Woolen

Jackets

Hats

Mittens

Cotton

Shirts

Jackets

Full T-Shirts

 

Also, how do I go about adding the text CATALOG at the top (I would like to set a background colour and text colour for this.)?

Thanks in advance.

Edited by troubleshooter2000
Link to comment
Share on other sites

Hi all

 

Just to let you know , i had a problem in my includes/configure.php file wich had:

 

define('HTTP_COOKIE_PATH', '//');

define('HTTPS_COOKIE_PATH', '//');

define('DIR_WS_HTTP_CATALOG', '//');

define('DIR_WS_HTTPS_CATALOG', '//');

 

 

these should have just one /

 

I changed that and all is fine.

 

Thanks to mrphil and Paul who pointed it out to me.

 

 

Gr, Rob

Link to comment
Share on other sites

Hi,

 

Im trying to get Dynamenu to output the Horizontal Drop-down root catagories into two rows is this possible?

 

please see http://www.dev.countybatteryservices.co.uk/

I don't know how to do this in dynamenu, but the "Category Tabs with Subs" contribution lets you have multiple rows for the categories, and you could also try using the Suckerfish Menu css type menu setup for your categories.

I did have that working at one time, then had to remove it, and I don't remember exactly how I did it.You should remove that silly nowrap="nowrap" from the template in any case. Then, find this code in your stylesheet (two places)

white-space: nowrap;

and change it to this

white-space: normal;

That should fix the problem.

 

Regards

Jim

I am trying to do this too. I have tried using the suggestion by Jim but this word wraps multi word category names onto new lines, not rows for multiple lines of categories. Has anyone successfully used Dynamenu to output the Horizontal Drop-down root categories into two rows??? I'd love to know as its got me stumped!

Link to comment
Share on other sites

This may have already been asked but, if so, I have done a search and must have overlooked it. I apologize in advance if this has happened. Ok, I'm using a vertical fly-out menu and I have subcategories. Well, the way I have my items set up has created a problem. I'll give you an example. I have a category called "Christmas" and within it I have gift items. But I also have a subcategory for "ornaments". So, in my menu, the Christmas items and the subcategory "ornaments" folder fly-out together in a list. Well, when I started looking through my menu on my site, I noticed that it places the items in my Christmas category above the "ornaments" subcategory in the list. It's kind of easy to miss the subcategories unless you're specifically looking for the arrow because it is at the bottom of the list. Okay, so I was brainstorming and thought that I'd like two out of these three things to solve my problem. I want the first thing for sure and then I'd choose between the 2nd and 3rd things.

 

1) I want my subcategories to be at the top of the list and then the category items to be below them. Is that possible?

 

2) I'd like my subcategory folder to have a different background color than the category items (if possible).....or......

 

3) I'd like to make my category folders and items to have regular text but my subcategory folders to be in bold.

 

Can anyone tell me which files I might look in to change this? If the code is in PHP, can someone help? (If it's HTML, I can fix it, myself)

 

Okay, problem number two. When I set my Dynamenu to show up NOT in a box, all of the other boxes on my page stretch out to take up the width of the page and squeeze my text and my "New Products" box to the bottom. How can I keep this from happening? I really like the menu to NOT be enclosed in a box. If it helps to tell you....I have STS installed but turned off at this moment. I plan to use it but I haven't played around with it yet. That will come over the next week or so.

 

Thanks in advance for any replies! I do know a little bit about HTML (can write basics) and PHP (can get a basic understanding of what I'm looking at but haven't written any). I'm learning as I go, though.

Edited by cherishedmoments
Link to comment
Share on other sites

Hi

 

Great contribution but it took me days!!! to get it working properly, I am using STS 4.6 and Dynamenu. I wanted to have a horizontal menu without the box around it - so to display the menu output only.

 

Could I get this to work - yes eventualy, my problem was that if I had $show_dmcats_as_box = true; in boxes/dm_categories.php the menu worked fine but there was a box around the menu that didn't fit in with the design. If I set it to $show_dmcats_as_box = false; the main categories were displayed correctly but now drop down menus appeared whatever I tried.

 

I eventually copied the following and pasted it just before the $dmbox$ in my design and all is fine, for some reason when the $show_dmcats_as_box = was set to false the javascript did not appear.

 

	        <script language="JavaScript" type="text/javascript">
           <!--
               // PHP Layers Menu 3.2.0-rc (C) 2001-2004 Marco Pratesi - http://www.marcopratesi.it/

DOM = (document.getElementById) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
// We need to explicitly detect Konqueror
// because Konqueror 3 sets IE = 1 ... AAAAAAAAAARGHHH!!!
Konqueror = (navigator.userAgent.indexOf('Konqueror') > -1) ? 1 : 0;
// We need to detect Konqueror 2.2 as it does not handle the window.onresize event
Konqueror22 = (navigator.userAgent.indexOf('Konqueror 2.2') > -1 || navigator.userAgent.indexOf('Konqueror/2.2') > -1) ? 1 : 0;
Konqueror30 =
(
	navigator.userAgent.indexOf('Konqueror 3.0') > -1
	|| navigator.userAgent.indexOf('Konqueror/3.0') > -1
	|| navigator.userAgent.indexOf('Konqueror 3;') > -1
	|| navigator.userAgent.indexOf('Konqueror/3;') > -1
	|| navigator.userAgent.indexOf('Konqueror 3)') > -1
	|| navigator.userAgent.indexOf('Konqueror/3)') > -1
)
? 1 : 0;
Konqueror31 = (navigator.userAgent.indexOf('Konqueror 3.1') > -1 || navigator.userAgent.indexOf('Konqueror/3.1') > -1) ? 1 : 0;
// We need to detect Konqueror 3.2 and 3.3 as they are affected by the see-through effect only for 2 form elements
Konqueror32 = (navigator.userAgent.indexOf('Konqueror 3.2') > -1 || navigator.userAgent.indexOf('Konqueror/3.2') > -1) ? 1 : 0;
Konqueror33 = (navigator.userAgent.indexOf('Konqueror 3.3') > -1 || navigator.userAgent.indexOf('Konqueror/3.3') > -1) ? 1 : 0;
Opera = (navigator.userAgent.indexOf('Opera') > -1) ? 1 : 0;
Opera5 = (navigator.userAgent.indexOf('Opera 5') > -1 || navigator.userAgent.indexOf('Opera/5') > -1) ? 1 : 0;
Opera6 = (navigator.userAgent.indexOf('Opera 6') > -1 || navigator.userAgent.indexOf('Opera/6') > -1) ? 1 : 0;
Opera56 = Opera5 || Opera6;
IE = (navigator.userAgent.indexOf('MSIE') > -1) ? 1 : 0;
IE = IE && !Opera;
IE5 = IE && DOM;
IE4 = (document.all) ? 1 : 0;
IE4 = IE4 && IE && !DOM;

           // -->
       </script>

       <script language="JavaScript" type="text/javascript" src="includes/functions/dynamenu/libjs/layersmenu-library.js"></script>
       <script language="JavaScript" type="text/javascript" src="includes/functions/dynamenu/libjs/layersmenu.js"></script>
   <!-- beginning of menu header - PHP Layers Menu 3.2.0-rc (C) 2001-2004 Marco Pratesi - http://www.marcopratesi.it/ -->

<script language="JavaScript" type="text/javascript">
<!--

menuTopShift = 0;
menuRightShift = 4;
menuLeftShift = 4;

var thresholdY = 1;
var abscissaStep = 140;

toBeHidden = new Array();
toBeHiddenLeft = new Array();
toBeHiddenTop = new Array();

listl = ['L1','L10','L14'];
var numl = listl.length;

father = new Array();
for (i=1; i<=20; i++) {
father['L' + i] = '';
}
father_keys = ['L2','L3','L4','L5','L6','L7','L8','L9','L11','L12','L13','L15','L16','L17','L18','L19','L20'];
father_vals = ['L1','L1','L1','L1','L1','L1','L1','L1','L10','L10','L10','L14','L14','L14','L14','L14','L14'];
for (i=0; i<father_keys.length; i++) {
father[father_keys[i]] = father_vals[i];
}

lwidth = new Array();
var lwidthDetected = 0;

function moveLayers()
{
if (!lwidthDetected) {
	for (i=0; i<numl; i++) {
		lwidth[listl[i]] = getOffsetWidth(listl[i]);
	}
	lwidthDetected = 1;
}
if (IE4) {
	for (i=0; i<numl; i++) {
		setWidth(listl[i], abscissaStep);
	}
}
var catmenuTOP = getOffsetTop('catmenuL1');
var catmenuHEIGHT = getOffsetHeight('catmenuL1');
setTop('L1', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L1', 'catmenu');
setTop('L10', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L10', 'catmenu');
setTop('L14', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L14', 'catmenu');

}

back = new Array();
for (i=1; i<=20; i++) {
back['L' + i] = 0;
}

// -->
</script>

 

I hope this tip helps others in the same position.

Link to comment
Share on other sites

 

You can also try this:

Put the </div> closing tag back where it was and put this line under like this:

<div id="website_name"><?php echo STORE_NAME; ?></div>
<div id="menu_test">

Then in your stylesheet put this:

div#menu_test {  
z-index: 8;
position: absolute;
top: 40px;
}

 

Just wanted to say THAAAAAANK YOU! Worked for me too! :-)

Link to comment
Share on other sites

Where can I download the latest full package of this Contribution?

 

The history tab was confusing as most of them say "Not a full package"?

 

Many thanks.

 

Cheers

 

ANYONE?

 

Only want a download link?!

Link to comment
Share on other sites

Will someone please help me before I go insane?!!!! I am using the freeosc_60 template with the vertical fly-out menu and FOR THE LIFE OF ME I cannot get the menu to fly-out. Do I have this in the wrong place?

 

// Output the footer for Dynamenu for osCommerce

echo $GLOBALS['dmfooter'];

 

I have it at the bottom of my stylesheet. Is that wrong?! Will someone please help?! I've tried and tried and I can't get it to work!

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