Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Dynamenu" for osCommerce


Recommended Posts

I'm pretty sure this is in the template. Look in your catalog/includes/functions/dynamenu/templates folder for the template that goes with the layout you are using and see if that has what you need. I know it also uses the osC code that build that stock category box as well.

 

Hello! Can anyone tell me where in the contribution files you can find the logic that actually loops and builds the <HTML> code (from .ihtml file) for the number of store categories that make up the root of the menus? I know that the actual write of the menu is on lines 200-210 of dm_categories.php file:

 

// 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 '<br>';	
} else {
echo $before_nobox_html;
   echo $categories_menu;
echo $after_nobox_html;
}

 

Basically I need to get into the loop logic before that actually builds the menu code like this from the .ihtml file:

 

<div id="catmenuL1" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
 <a href="http://localhost/index.php/cPath/1" onmouseover="shutdown();" title="Girls"><img
 align="top" src="images/transparent.png" width="1" height="16" border="0"
 alt="" />Girls   </a>
</div>
<div id="catmenuL2" class="horizitem dmselected" onmouseover="clearLMTO();" onmouseout="setLMTO();">

 <a href="http://localhost/index.php/cPath/2" onmouseover="moveLayerX1('L2', 'catmenu') ; LMPopUp('L2', false);" title="Boys"><img
 align="top" src="images/transparent.png" width="1" height="16" border="0"
 alt="" />Boys <img
 src="images/down-arrow.png" width="9" height="5"
 border="0" alt=">>" />   </a>
</div>

 

If that does not make sense please let me know and thank you for any help!

 

Heather

~Tracy
 

Link to comment
Share on other sites

Thank you Tracy. I was able to manipulate the CSS to do what I want in the end.

 

Another question since you seem to know this contrib really well...How do I get the horizontal rollover menu to work to show subcategories when you mouseover the root category (like here). Mine for some reason is not populating the footer sub-categries until after I click on a root menu item and only when it is the selected category will the rollover work (footer code is in place as instructed). Is there some setting I am missing for this? Thanks!

 

 

I'm pretty sure this is in the template. Look in your catalog/includes/functions/dynamenu/templates folder for the template that goes with the layout you are using and see if that has what you need. I know it also uses the osC code that build that stock category box as well.

Link to comment
Share on other sites

I have both the dynamenu and the enable/disable categories installed. However im not able to hide categories shown in the dynamenu. Is there any way to make this work? There is 1 category in which i keep files used with the custom product builder i cant have shown to the public.

Link to comment
Share on other sites

[

Yes, this is definately because the footer is not being output... The output for the footer *must be* just before the closing </BODY> tag or you may experience alignment problems on certain browsers. I'm afraid I'm not familiar with that contribution, but if it uses HTML templates, perhaps it will parse PHP in them by placing it in the appropriate tags?

<?php  echo $GLOBALS['dmfooter']; ?>

 

Where exactly i should put it.

I use STS and only dynamenu type that works for me is tree type

Link to comment
Share on other sites

In your .ihtml template (that same folder I mentioned before) it should have onmouseover= which is the way my layersmenu_horizontal_menu.ihtml template has it. Are you sure you aren't set to use the plain templates instead?

 

You can check this by seeing what you have set in your catalog/includes/boxes/dm_categories.php file here:

  // 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;

 

So, for a horizontal menu with the mouseover dropdowns you would want 0 for your menu type. For a plain horizontal menu you would use 3 here.

 

 

Thank you Tracy. I was able to manipulate the CSS to do what I want in the end.

 

Another question since you seem to know this contrib really well...How do I get the horizontal rollover menu to work to show subcategories when you mouseover the root category (like here). Mine for some reason is not populating the footer sub-categries until after I click on a root menu item and only when it is the selected category will the rollover work (footer code is in place as instructed). Is there some setting I am missing for this? Thanks!

~Tracy
 

Link to comment
Share on other sites

I use the SPPC and Hide Products and Categories for SPPC contributions. So this may not be exactly what you need, but hopefully similar enough to give you an idea what to do.

 

In your catalog/includes/boxes/dm_categories.php file check this area:

// Create the root category list
function tep_make_cat_dmlist($rootcatid = 0, $maxlevel = 0){

   global $cPath_array, $show_full_tree, $languages_id, $customer_group_id;

   global $idname_for_menu, $cPath_array, $show_full_tree, $languages_id, $customer_group_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, c.sort_order, cd.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c LEFT JOIN ' . TABLE_CATEGORIES_DESCRIPTION . ' cd USING(categories_id) where cd.language_id="' . (int)$languages_id .'" and find_in_set("' . $customer_group_id . '", categories_hide_from_groups) = 0 '.$parent_query.' order by c.sort_order, cd.categories_name');

 

Notice I needed to add the $customer_group_id to the global and then I needed to adjust the query to add the 'and find_in_set("' . $customer_group_id .'", categories_hide_from_groups) = 0' bit of code.

 

I have both the dynamenu and the enable/disable categories installed. However im not able to hide categories shown in the dynamenu. Is there any way to make this work? There is 1 category in which i keep files used with the custom product builder i cant have shown to the public.

~Tracy
 

Link to comment
Share on other sites

I had to make some adjustments to get this above the </body> tag

 

In all my of catalog/*.php files that have this bit of code

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

I made sure that line of code was just above the </body></html> tags. Then I had the catalog/includes/application_bottom.php file echo the dynamenu footer.

 

[

Yes, this is definately because the footer is not being output... The output for the footer *must be* just before the closing </BODY> tag or you may experience alignment problems on certain browsers. I'm afraid I'm not familiar with that contribution, but if it uses HTML templates, perhaps it will parse PHP in them by placing it in the appropriate tags?

<?php  echo $GLOBALS['dmfooter']; ?>

 

Where exactly i should put it.

I use STS and only dynamenu type that works for me is tree type

~Tracy
 

Link to comment
Share on other sites

Thank you for the response. I do have the menu selection set to 0 and the onmoueover is in the template just like yours. The issue seems to be that the sub-categories (executed in the dmfooter call) are not being written at the root level unless when a root menu item is clicked. Once it is clicked then just the sub-categories are written for the root category item that is clicked, not for any other root category that has sub-categories like it is supposed to. Most frustrating as I have poured through the code and cannot figure out what it is!

 

I have installed the last full version from the contrib page 1.11 so do you know if there is a later full package I should be using? I am running a modified version of OSC 2.2.

 

 

In your .ihtml template (that same folder I mentioned before) it should have onmouseover= which is the way my layersmenu_horizontal_menu.ihtml template has it. Are you sure you aren't set to use the plain templates instead?

 

You can check this by seeing what you have set in your catalog/includes/boxes/dm_categories.php file here:

  // 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;

 

So, for a horizontal menu with the mouseover dropdowns you would want 0 for your menu type. For a plain horizontal menu you would use 3 here.

Link to comment
Share on other sites

Hello all,

 

I've some weird bug,

 

Horizontal dropdown in a box works:

	$menu_type = 0;
$show_dmcats_as_box = true;	

 

this works, fly-out works:

	$menu_type = 1;
$show_dmcats_as_box = false;	

 

But this doesn't, no drop-down showing:

	$menu_type = 0;
$show_dmcats_as_box = false;	

 

Working with [Dynamenu (May 27, 2006) and STSv4.5.8], from Bill Kelum on a clean install,

and with the STS fix from jbennette 27 Mar 2009.

 

Tried searching this forum, probably missed the solution. :(

 

What is the fix.

 

Did default install 2 with STS from Kelan.

 

Working only with INfobox on if I set it to false it ain't working anymore? Changed nothing what's the fix?

 

Kanata,

Link to comment
Share on other sites

I am still using v1.11 for Dynamenu so I haven't kept up with all the latest updates. I just went and looked at the contrib. page and see there are a bunch of addons now! I might have to try the "choose the menu type from admin 2" by multimixer - that looks wonderful!!

 

I have never had a problem with it not loading the subs until an onclick is performed - so I'm sorry but you've got me stumped. Have you tried using a file comparison tool to compare the files in your contrib. download with your own files and see if maybe something is different that might cause this strange behavior?

 

Hey multimixer - you wouldn't happen to have seen a way when creating that addon to be able to split the list of products would you? I can split my subcategories fine - but I just can't seem to get it right for counting and splitting the products so there is a "more" link when there are a ton of products. :blush:

 

Thank you for the response. I do have the menu selection set to 0 and the onmoueover is in the template just like yours. The issue seems to be that the sub-categories (executed in the dmfooter call) are not being written at the root level unless when a root menu item is clicked. Once it is clicked then just the sub-categories are written for the root category item that is clicked, not for any other root category that has sub-categories like it is supposed to. Most frustrating as I have poured through the code and cannot figure out what it is!

 

I have installed the last full version from the contrib page 1.11 so do you know if there is a later full package I should be using? I am running a modified version of OSC 2.2.

~Tracy
 

Link to comment
Share on other sites

What are you setting up as your before nobox html and after nobox html code? When you don't display this as a box you need to set up that code. Dynamenu is displayed in a table. You might want to "view source" in your browser and see if you are missing an opening or closing table tag or tr tag.

 

What is the fix.

 

Did default install 2 with STS from Kelan.

 

Working only with INfobox on if I set it to false it ain't working anymore? Changed nothing what's the fix?

 

Kanata,

~Tracy
 

Link to comment
Share on other sites

Hey multimixer - you wouldn't happen to have seen a way when creating that addon to be able to split the list of products would you? I can split my subcategories fine - but I just can't seem to get it right for counting and splitting the products so there is a "more" link when there are a ton of products. :blush:

 

Right, that would be a nice thing to do

Link to comment
Share on other sites

What are you setting up as your before nobox html and after nobox html code? When you don't display this as a box you need to set up that code. Dynamenu is displayed in a table. You might want to "view source" in your browser and see if you are missing an opening or closing table tag or tr tag.

 

Look my code:

 

<!-- start dmbox //-->

<div class="horbar">
<table border="0" cellspacing="0" cellpadding="0">
<tr>

<td>

<div id="catmenuL1" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
<a href="http://kawaiishop.nl/oscommerce/catalog/dames-c-21.html" onmouseover="moveLayerX1('L1', 'catmenu') ; LMPopUp('L1', false);" title="Dames"><img
align="top" src="images/transparent.png" width="1" height="16" border="0"
alt="" />Dames <img
src="images/down-arrow.png" width="9" height="5"
border="0" alt=">>" />   </a>
</div>
</td>
<td>

<div id="catmenuL8" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
<a href="http://kawaiishop.nl/oscommerce/catalog/heren-c-22.html" onmouseover="moveLayerX1('L8', 'catmenu') ; LMPopUp('L8', false);" title="Heren"><img
align="top" src="images/transparent.png" width="1" height="16" border="0"
alt="" />Heren (3) <img
src="images/down-arrow.png" width="9" height="5"
border="0" alt=">>" />   </a>
</div>
</td>
<td>

<div id="catmenuL13" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
<a href="http://kawaiishop.nl/oscommerce/catalog/accesoires-c-23.html" onmouseover="moveLayerX1('L13', 'catmenu') ; LMPopUp('L13', false);" title="Accesoires"><img
align="top" src="images/transparent.png" width="1" height="16" border="0"
alt="" />Accesoires <img
src="images/down-arrow.png" width="9" height="5"
border="0" alt=">>" />   </a>
</div>
</td>
<td>

<div id="catmenuL19" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
<a href="http://kawaiishop.nl/oscommerce/catalog/bigeyes-circlelens-c-40.html" onmouseover="shutdown();" title="Bigeyes & Circlelens"><img
align="top" src="images/transparent.png" width="1" height="16" border="0"
alt="" />Bigeyes & Circlelens   </a>
</div>
</td>
<td>

<div id="catmenuL20" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
<a href="http://kawaiishop.nl/oscommerce/catalog/sale-c-24.html" onmouseover="shutdown();" title="SALE"><img
align="top" src="images/transparent.png" width="1" height="16" border="0"
alt="" />SALE   </a>

</div>
</td>
<td>

<div id="catmenuL21" class="horizitem " onmouseover="clearLMTO();" onmouseout="setLMTO();">
<a href="http://kawaiishop.nl/oscommerce/catalog/preorder-c-41.html" onmouseover="shutdown();" title="Pre-order"><img
align="top" src="images/transparent.png" width="1" height="16" border="0"
alt="" />Pre-order   </a>
</div>
</td>
</tr>
</table>
</div>

<!-- end dmbox //-->

 

All things are right.

 

My file:

	echo $before_nobox_html;	
   echo $categories_menu;
	echo $after_nobox_html;

 

	// 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 = '';

 

What's wrong now?

 

The dm menu is displaying good but the popupmenu isn't coming?

Link to comment
Share on other sites

If i'm comparing my sources if i enable the box and disable:

 

This is missing if i set the infobox to false:

 

What's wrong? Where can I add it? Where must I look?

 

<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','L8','L13'];
var numl = listl.length;

father = new Array();
for (i=1; i<=21; i++) {
father['L' + i] = '';
}
father_keys = ['L2','L3','L4','L5','L6','L7','L9','L10','L11','L12','L14','L15','L16','L17','L18'];
father_vals = ['L1','L1','L1','L1','L1','L1','L8','L8','L8','L8','L13','L13','L13','L13','L13'];
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('L8', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L8', 'catmenu');
setTop('L13', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L13', 'catmenu');

}

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

// -->
</script>

Link to comment
Share on other sites

That code is found in your catalog/includes/functions/dynamenu/libjs/layersmenu-browser_detection.js file. This should be included from your catalog/includes/boxes/dm_categories.php file for menu types < 2 here:

 

// 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();

}

 

 

 

If i'm comparing my sources if i enable the box and disable:

 

This is missing if i set the infobox to false:

 

What's wrong? Where can I add it? Where must I look?

 

<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','L8','L13'];
var numl = listl.length;

father = new Array();
for (i=1; i<=21; i++) {
father['L' + i] = '';
}
father_keys = ['L2','L3','L4','L5','L6','L7','L9','L10','L11','L12','L14','L15','L16','L17','L18'];
father_vals = ['L1','L1','L1','L1','L1','L1','L8','L8','L8','L8','L13','L13','L13','L13','L13'];
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('L8', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L8', 'catmenu');
setTop('L13', catmenuTOP + catmenuHEIGHT);
moveLayerX1('L13', 'catmenu');

}

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

// -->
</script>

~Tracy
 

Link to comment
Share on other sites

That code is found in your catalog/includes/functions/dynamenu/libjs/layersmenu-browser_detection.js file. This should be included from your catalog/includes/boxes/dm_categories.php file for menu types < 2 here:

 

// 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();

}

 

And yes this is my dm-categories! It's good but the website ain't using the script can I set the script somewhere? Or how can I FIX THIS so it will work?

Link to comment
Share on other sites

Can someone help me with this error:

 

Error: Undefined index: dmfooter

File: includes/sts_templates/freeoscommerce_212/freeoscommerce_212.html

Line: 127

 

How cab I fix this?

Link to comment
Share on other sites

And yes this is my dm-categories! It's good but the website ain't using the script can I set the script somewhere? Or how can I FIX THIS so it will work?

 

So this is not the problem. It'slike it's not loading the javascript file in STS. So where must i put the javascript so it is working!? in STS, then I'll make a external javascript file of it.

Link to comment
Share on other sites

Myself - I would uninstall and go to manually installing Dynamenu on STS according to Bill Kellum's directions (from the STS forum boards). I have not installed the version you did, I have always manually installed this contribution. So it is hard for me to troubleshoot why it would not work as I've never had this problem.

 

So this is not the problem. It'slike it's not loading the javascript file in STS. So where must i put the javascript so it is working!? in STS, then I'll make a external javascript file of it.

~Tracy
 

Link to comment
Share on other sites

I haven't seen this error before - I would check with Bill Kellum on the STS forums.

 

Can someone help me with this error:

 

Error: Undefined index: dmfooter

File: includes/sts_templates/freeoscommerce_212/freeoscommerce_212.html

Line: 127

 

How cab I fix this?

~Tracy
 

Link to comment
Share on other sites

I haven't seen this error before - I would check with Bill Kellum on the STS forums.

 

 

 

 

But it is this line that causes the error:

<?php echo $GLOBALS['dmfooter']; ?>

 

This belongs to Dynamenu..

Link to comment
Share on other sites

I have tried installing this add on just using the original file. My website once installed gives me this error.

Fatal error: Cannot redeclare tep_make_cat_dmlist() (previously declared in /home/aopaj/public_html/catalog/includes/boxes/dm_categories.php:210) in /home/aopaj/public_html/catalog/includes/boxes/dm_categories.php on line 245

 

I am trying to place this in the header of the STS template if that helps. I did follow the instructions for STS.

Link to comment
Share on other sites

What exactly are you putting into the header of the STS Template?

 

I have tried installing this add on just using the original file. My website once installed gives me this error.

Fatal error: Cannot redeclare tep_make_cat_dmlist() (previously declared in /home/aopaj/public_html/catalog/includes/boxes/dm_categories.php:210) in /home/aopaj/public_html/catalog/includes/boxes/dm_categories.php on line 245

 

I am trying to place this in the header of the STS template if that helps. I did follow the instructions for STS.

~Tracy
 

Link to comment
Share on other sites

What page are you putting that code on? I remember it only worked on one file for me.

 

 

 

I have it in my STS template as described in the Dynamenu installation for STS.

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