Jump to content
Sign in to follow this  
nate_02631

"Dynamenu" for osCommerce

Recommended Posts

FYI... If you want to use Dynamenu with the Separate Price and Hide Product & Categories contribution, here is what I did to modify the code in the dm_categories.php file (v1.11):

 

		global $sppc_customer_group_id;
if(!tep_session_is_registered('sppc_customer_group_id')) {
	  $customer_group_id = '0';
	} else {
	  $customer_group_id = $sppc_customer_group_id;
	}

$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.' and find_in_set('.$customer_group_id.',categories_hide_from_groups) = 0 order by sort_order, cd.categories_name');

 

Replace the current $result = tep_db_query ... line with the above.

Share this post


Link to post
Share on other sites

Thank you for the reply. I can now set the path in two files which leads to all kinds of Error variations, but still maintains the "is not a directory".

 

I read your mail about putting path into dynamenu. The PostNuke version of Dynamenu does not pull Categories from a Database but you have to input the menu lines manually. Maybe it is of use to you and you can adapt it.

 

Michael

Share this post


Link to post
Share on other sites

Solution for the path problem when integrating Dynamenu into Multi stores. After this modification the Dynamenu works but shows all Categories not only the one selected for the store in Multi stores.

 

Only edit /store2/includes/boxes/dm_categories.php

 

Find &mid->setImgdir('./images/');

 

Change to the file path without the initial "."

!

in my case $mid->setImgdir('/www.htdocs/v116578/otx/shop1/images/');

 

Do the same for $mid->setIcondir

 

Michael

Share this post


Link to post
Share on other sites

Next and last (!) Problem including Dynamenu with Multi Stores:

 

The Mult Store Contrib has one database. It allows the administrator to select for each categorie in which of all his stores it should be displayed. This way the different stores could have differen categories leading to different product ranges or, have the same categories.

 

With the standard Dynamenu function it pulls in all the categories from the database, not only the marked ones.

After this text I include the /includes/boxes/categories.php file which in the standard installation of Multi Stores displays only the selected categories.

 

To edit the functions in dm_categories.php to the methodes used in categories.php should not be too difficult but beats me (so far)! Anybody any suggestions or HELP?

 

/boxes/categories.php

 

<?php
/*
 $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

for ($i=0; $i<$tree[$counter]['level']; $i++) {
  $categories_string .= "  ";
}

$categories_string .= '<a href="';

if ($tree[$counter]['parent'] == 0) {
  $cPath_new = 'cPath=' . $counter;
} else {
  $cPath_new = 'cPath=' . $tree[$counter]['path'];
}

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
  $categories_string .= '<b>';
}

// display category name
$categories_string .= $tree[$counter]['name'];

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
  $categories_string .= '</b>';
}

if (tep_has_category_subcategories($counter)) {
  $categories_string .= '->';
}

$categories_string .= '</a>';

if (SHOW_COUNTS == 'true') {
  $products_in_category = tep_count_products_in_category($counter);
  if ($products_in_category > 0) {
	$categories_string .= ' (' . $products_in_category . ')';
  }
}

$categories_string .= '<br>';

if ($tree[$counter]['next_id'] != false) {
  tep_show_category($tree[$counter]['next_id']);
}
 }
?>
<!-- categories //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 new infoBoxHeading($info_box_contents, true, false);

 $categories_string = '';
 $tree = array();
//rmh M-S_multi-stores edited next line
 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '0' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
 while ($categories = tep_db_fetch_array($categories_query))  {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
											'parent' => $categories['parent_id'],
											'level' => 0,
											'path' => $categories['categories_id'],
											'next_id' => false);

if (isset($parent_id)) {
  $tree[$parent_id]['next_id'] = $categories['categories_id'];
}

$parent_id = $categories['categories_id'];

if (!isset($first_element)) {
  $first_element = $categories['categories_id'];
}
 }

 //------------------------
 if (tep_not_null($cPath)) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
  unset($parent_id);
  unset($first_id);
//rmh M-S_multi-stores edited next line
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
  if (tep_db_num_rows($categories_query)) {
	$new_path .= $value;
	while ($row = tep_db_fetch_array($categories_query)) {
	  $tree[$row['categories_id']] = array('name' => $row['categories_name'],
										   'parent' => $row['parent_id'],
										   'level' => $key+1,
										   'path' => $new_path . '_' . $row['categories_id'],
										   'next_id' => false);

	  if (isset($parent_id)) {
		$tree[$parent_id]['next_id'] = $row['categories_id'];
	  }

	  $parent_id = $row['categories_id'];

	  if (!isset($first_id)) {
		$first_id = $row['categories_id'];
	  }

	  $last_id = $row['categories_id'];
	}
	$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
	$tree[$value]['next_id'] = $first_id;
	$new_path .= '_';
  } else {
	break;
  }
}
 }
 tep_show_category($first_element); 

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

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- categories_eof //-->

Share this post


Link to post
Share on other sites

Got the filter sorted, but the "flyout" is not working anymore. It displays categories only if they are selected for that shop in categories_to_store as indented in Multi Stores. I am using the standard vertical flyout menu.

 

In /catalog/includes/boxes I editet dm_categories as follows:

 

Replaced

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

 

with

 

$result = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_CATEGORIES_TO_STORES . " c2s where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and c.categories_id = c2s.categories_id and c2s.stores_id = '" . STORES_ID . "' and cd.language_id='" . (int)$languages_id ."' '.$parent_query.'order by sort_order, cd.categories_name");

Share this post


Link to post
Share on other sites

Hi, I'm Giuseppe from Italy.

Dynamenu is a great contrib, but I've searched (without response) a very usefull parameter: the possibility of assigning a delay (half a second, for exemple) when submenues appear.

 

Is there a way to do this?

Share this post


Link to post
Share on other sites

Arrrrrgh!!! I've a big trouble!

While Dynamenu seemed to work on local, in remote I've 5 times the message "Template Error: setRoot: . is not a directory." I think it's related to the code in includes/boxes/dm_categories.php

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

Maybe because of catalog/ directory is missing?

 

Help me, please.

Edited by Noy

Share this post


Link to post
Share on other sites
Solution for the path problem when integrating Dynamenu into Multi stores. After this modification the Dynamenu works but shows all Categories not only the one selected for the store in Multi stores.

 

Only edit /store2/includes/boxes/dm_categories.php

 

Find &mid->setImgdir('./images/');

 

Change to the file path without the initial "."

!

in my case $mid->setImgdir('/www.htdocs/v116578/otx/shop1/images/');

 

Do the same for $mid->setIcondir

 

Michael

I made this change but it doesn't work for me.

We suppose my site is on www.mysite.com... how can I integrate your mod??

The full code on dm_categories.php is

 

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

Please, help me if you know! :'(

Share this post


Link to post
Share on other sites

I have a similar problem where the flyouts don't work and applied your fix and the only time the sub-menus fly is when the cateogry is entered. please see the test site at www.monikartdesign.com/shop. from the home page none of the menus fly-down but when you enter a category like 'women' the fly outs work on those pages. have any idea why this is happening?

 

I finally found a solution the problem of subcategories not showing when using STS templates with dynamenu

 

The following line does not work when placed in the footer.php but needs to go into application_bottom.php before the last ?>

 

// Output the footer for Dynamenu for osCommerce

echo $GLOBALS['dmfooter'];

 

Hope this helps a few of you.


What would you do if you knew you could not fail?

Share this post


Link to post
Share on other sites

I moved away from Dynamenu and try to implement a html/css flyout menu with some success.

 

Reason: Some visitors have javascript blocket with e.g. NoScripts. They loose the funcitonality in Dynamenu completely and are unable to visit categories.

 

See: www.grc.com/menu2/invitro.htm (not my site) for a working example.

 

Michael

Share this post


Link to post
Share on other sites

I am not a programmer. You might laugh but do not lock me away if my approach is stupid. Seems to work.

 

1. Create a file which I called categories_css.php (it will be placed in /catalog/includes/boxes

 

2. In the file /catalog/includes/column_left.php replace . include(DIR_WS_BOXES . 'categories.php'); with include(DIR_WS_BOXES . 'categories_css.php');

 

3. The file in my case contains

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1"></meta>
<title>ot-mais Product-Menu</title>
<meta name="" content=""></meta>

<style type="text/css" media="screen"> @import ""; /***** General formatting only ****/

/**************** menu coding *****************/
#menu {
width: 9em;
background: #FFEECA;
}

#menu ul {
list-style: none;
margin: 0;
padding: 0;
}

#menu a, #menu h2 {
font: bold 11px/16px arial, helvetica, sans-serif;
display: block;
border-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 2px 3px;
}

#menu h2 {
color: #fff;
background: #000;
text-transform: uppercase;
}

#menu a {
color: #000;
background: #FFEECA;
text-decoration: none;
}

#menu a:hover {
color: #a00;
background: #fff;
}

#menu li {
position: relative;
}

#menu ul ul ul {
position: absolute;
top: 0;
left: 100%;
width: 100%;
}

div#menu ul ul ul,
div#menu ul ul li:hover ul ul
{display: none;}

div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{display: block;}

</style>
<!--[if IE]>
<style type="text/css" media="screen">
#menu ul li {float: left; width: 100%;}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css" media="screen">
body {
behavior: url(csshover.htc);
font-size: 100%;
} 
#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;} 

#menu a, #menu h2 {
font: bold 0.7em/1.4em arial, helvetica, sans-serif;
} 

</style>
<![endif]-->
</head>
<body>
<div id="pagetop">

<!-- start Menu HTML -->
<div id="menu">


<ul>
 <li><h2>Product Catalog</h2>

<ul>
  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21&osCsid=67bb1674992237fac0b73d342e7f8f22">Leg Prosthetics</a>
	<ul>
	  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Joints">Joints</a>
		<ul>
		  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30_44&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Hips">Hip-Joints</a></li>
		  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30_45&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Knees">Knee-Joints</a></li>			
		  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30_46&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Ankles">Ankle-Joints</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Socket Adapters</a>
		<ul>
		  <li><a href="" title="wooden">Wood</a></li>
		  <li><a href="" title="plastic">Plastic</a></li>			
		  <li><a href="" title="metal">Metal</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Connectors</a>
		<ul>
		  <li><a href="" title="">-</a></li>
		  <li><a href="" title="">-</a></li>			
		  <li><a href="" title="">-l</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Tubes</a>
		<ul>
		  <li><a href="" title="">-</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Children System</a>
		<ul>
		  <li><a href="" title="">Coming Soon</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Feet</a>
		<ul>
		  <li><a href="" title="">Please Enquire</a></li>

		</ul>
	  </li>
	</ul>
  </li>
</ul>

<ul>
  <li><a href="">Arm Prosthetics</a>
	<ul>
	  <li><a href="" title="Joints">Joints</a>
		<ul>
		  <li><a href="" title="Shoulders">Shoulder-Joints</a></li>
		  <li><a href="" title="Elbows">Elbow-Joints</a></li>			
		  <li><a href="" title="Wrists">Wrist-Joints</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Please Enquire</a>
		<ul>
		  <li><a href="" title=" ">-</a></li>
		  <li><a href="" title=" ">-</a></li>			
		  <li><a href="" title=" ">-</a></li>
		</ul>
	  </li>
	</ul>
  </li>
</ul>
<ul>
  <li><a href="">Materials</a>
	<ul>
	  <li><a href="" title="">Please Enquire</a>
		<ul>
		  <li><a href="" title="">-</a></li>
		  <li><a href="" title="">-</a></li>			
		  <li><a href="" title="">-</a></li>
		</ul>
	  </li>
	</ul>
  </li>
</ul>
 </li>
</ul>							
</div>
</body>
</html>

 

It works but not on the links you find in the code. The code is html and a straight modification from the tutorial at http://www.seoconsultants.com/css/menus/tutorial/ .

 

The first part are the css settings which allow to change width, background colour and fonts.

 

The second part provides the links and the flyout layering (3 layers in this case)

 

It would be nice if it could somehow read the category names from the database as Dynamenu does. But for this I would need professional help. Maybe somebody adopts the idea and creates a working contribution.

 

Michael

Share this post


Link to post
Share on other sites

i'd like to stick with dynamenu since it has been working for people and i know it's just some little thing i may have missed. anyone have a solution? would be much appreciated

 

I have a similar problem where the flyouts don't work and applied your fix and the only time the sub-menus fly is when the cateogry is entered. please see the test site at www.monikartdesign.com/shop. from the home page none of the menus fly-down but when you enter a category like 'women' the fly outs work on those pages. have any idea why this is happening?

What would you do if you knew you could not fail?

Share this post


Link to post
Share on other sites

but this isn't dynamic. i think that's the pont is to have a drop down menu that's dynamic otherwise a simple css dropdown can be built.

 

I am not a programmer. You might laugh but do not lock me away if my approach is stupid. Seems to work.

 

1. Create a file which I called categories_css.php (it will be placed in /catalog/includes/boxes

 

2. In the file /catalog/includes/column_left.php replace . include(DIR_WS_BOXES . 'categories.php'); with include(DIR_WS_BOXES . 'categories_css.php');

 

3. The file in my case contains

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1"></meta>
<title>ot-mais Product-Menu</title>
<meta name="" content=""></meta>

<style type="text/css" media="screen"> @import ""; /***** General formatting only ****/

/**************** menu coding *****************/
#menu {
width: 9em;
background: #FFEECA;
}

#menu ul {
list-style: none;
margin: 0;
padding: 0;
}

#menu a, #menu h2 {
font: bold 11px/16px arial, helvetica, sans-serif;
display: block;
border-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 2px 3px;
}

#menu h2 {
color: #fff;
background: #000;
text-transform: uppercase;
}

#menu a {
color: #000;
background: #FFEECA;
text-decoration: none;
}

#menu a:hover {
color: #a00;
background: #fff;
}

#menu li {
position: relative;
}

#menu ul ul ul {
position: absolute;
top: 0;
left: 100%;
width: 100%;
}

div#menu ul ul ul,
div#menu ul ul li:hover ul ul
{display: none;}

div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{display: block;}

</style>
<!--[if IE]>
<style type="text/css" media="screen">
#menu ul li {float: left; width: 100%;}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css" media="screen">
body {
behavior: url(csshover.htc);
font-size: 100%;
} 
#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;} 

#menu a, #menu h2 {
font: bold 0.7em/1.4em arial, helvetica, sans-serif;
} 

</style>
<![endif]-->
</head>
<body>
<div id="pagetop">

<!-- start Menu HTML -->
<div id="menu">
<ul>
 <li><h2>Product Catalog</h2>

<ul>
  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21&osCsid=67bb1674992237fac0b73d342e7f8f22">Leg Prosthetics</a>
	<ul>
	  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Joints">Joints</a>
		<ul>
		  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30_44&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Hips">Hip-Joints</a></li>
		  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30_45&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Knees">Knee-Joints</a></li>			
		  <li><a href="http://ot-mais.com/catalog/index.php?cPath=21_30_46&osCsid=67bb1674992237fac0b73d342e7f8f22" title="Ankles">Ankle-Joints</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Socket Adapters</a>
		<ul>
		  <li><a href="" title="wooden">Wood</a></li>
		  <li><a href="" title="plastic">Plastic</a></li>			
		  <li><a href="" title="metal">Metal</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Connectors</a>
		<ul>
		  <li><a href="" title="">-</a></li>
		  <li><a href="" title="">-</a></li>			
		  <li><a href="" title="">-l</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Tubes</a>
		<ul>
		  <li><a href="" title="">-</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Children System</a>
		<ul>
		  <li><a href="" title="">Coming Soon</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Feet</a>
		<ul>
		  <li><a href="" title="">Please Enquire</a></li>

		</ul>
	  </li>
	</ul>
  </li>
</ul>

<ul>
  <li><a href="">Arm Prosthetics</a>
	<ul>
	  <li><a href="" title="Joints">Joints</a>
		<ul>
		  <li><a href="" title="Shoulders">Shoulder-Joints</a></li>
		  <li><a href="" title="Elbows">Elbow-Joints</a></li>			
		  <li><a href="" title="Wrists">Wrist-Joints</a></li>
		</ul>
	  </li>

  <li><a href="" title="">Please Enquire</a>
		<ul>
		  <li><a href="" title=" ">-</a></li>
		  <li><a href="" title=" ">-</a></li>			
		  <li><a href="" title=" ">-</a></li>
		</ul>
	  </li>
	</ul>
  </li>
</ul>
<ul>
  <li><a href="">Materials</a>
	<ul>
	  <li><a href="" title="">Please Enquire</a>
		<ul>
		  <li><a href="" title="">-</a></li>
		  <li><a href="" title="">-</a></li>			
		  <li><a href="" title="">-</a></li>
		</ul>
	  </li>
	</ul>
  </li>
</ul>
 </li>
</ul>							
</div>
</body>
</html>

 

It works but not on the links you find in the code. The code is html and a straight modification from the tutorial at http://www.seoconsultants.com/css/menus/tutorial/ .

 

The first part are the css settings which allow to change width, background colour and fonts.

 

The second part provides the links and the flyout layering (3 layers in this case)

 

It would be nice if it could somehow read the category names from the database as Dynamenu does. But for this I would need professional help. Maybe somebody adopts the idea and creates a working contribution.

 

Michael


What would you do if you knew you could not fail?

Share this post


Link to post
Share on other sites
I have a similar problem where the flyouts don't work and applied your fix and the only time the sub-menus fly is when the cateogry is entered. please see the test site at www.monikartdesign.com/shop. from the home page none of the menus fly-down but when you enter a category like 'women' the fly outs work on those pages. have any idea why this is happening?

Solution for the matter:

In \catalog\includes\functions\dynamenu\lib\PHPLIB.php

comment this code:

 

		if (!is_dir($root)) {
		$this->halt("setRoot: $root is not a directory.");
		return false;
	}

to:

 

//		if (!is_dir($root)) {
//			$this->halt("setRoot: $root is not a directory.");
//			return false;
//		}

 

It'll remove the warning!

Enjoy, Giuseppe

Share this post


Link to post
Share on other sites

Thank you, I fixed it already but wasn't getting an error message. My issue was with the flyouts working. I was silly and placed the php code into my STS HTML layout. It worked, sort of but with the flyouts only wokrked for a category when you were inside that category.

 

My fix was to place the dynamenu box into my sts_user_code.php and add it to my HTML template that way. Then i removed the Info Box Header for the Dynamenu and now it works great. Firefox, IE.. www.mysampleshop.com

 

Solution for the matter:

In \catalog\includes\functions\dynamenu\lib\PHPLIB.php

comment this code:

 

		if (!is_dir($root)) {
		$this->halt("setRoot: $root is not a directory.");
		return false;
	}

to:

 

//		if (!is_dir($root)) {
//			$this->halt("setRoot: $root is not a directory.");
//			return false;
//		}

 

It'll remove the warning!

Enjoy, Giuseppe


What would you do if you knew you could not fail?

Share this post


Link to post
Share on other sites

Hi Monikart,

 

I saw www.mysampleshop.com and the dynamenu on top came out really nice. I have read for the past 3 days about installing dynamenu with sts and i just cant get it to work.

I cant get the flyouts to work. I followed what you and other members have done to make it work but I am not getting the same results as you. There is no step by step post on how to make these two great contribs work, just bits and pieces from the members.

I am wondering you could kindly post the steps that you followed to make it work on your site so nicely.

By the way, I am using the Custom boxes Add-on to sts and I dont know if that has anything to do with mine not working., even though i have followed the instrusctions you and other me

 

you can see my site work in progress http://panacine.com/index.php

 

Your help will be very well appreaciated by me and other osc members.

 

Thanks,

Allen

Share this post


Link to post
Share on other sites
Hi Monikart,

 

I saw www.mysampleshop.com and the dynamenu on top came out really nice. I have read for the past 3 days about installing dynamenu with sts and i just cant get it to work.

I cant get the flyouts to work. I followed what you and other members have done to make it work but I am not getting the same results as you. There is no step by step post on how to make these two great contribs work, just bits and pieces from the members.

I am wondering you could kindly post the steps that you followed to make it work on your site so nicely.

By the way, I am using the Custom boxes Add-on to sts and I dont know if that has anything to do with mine not working., even though i have followed the instrusctions you and other me

 

you can see my site work in progress http://panacine.com/index.php

 

Your help will be very well appreaciated by me and other osc members.

 

Thanks,

Allen

 

You have to put the css codes in your stylesheet.css to make it work!

 

THis is the standard style codes, put it in your stylesheet.css

 

/*
 $Id: dynamenu_for_osc_styles.txt,v 1.00 2006/05/07 20:04:02 nate_02631 Exp $

Dynamenu for osCommerce CSS Definitions

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce

Released under the GNU General Public License

Below are styles to be included in your catalog stylesheet (stylesheet.css) for
use with Dynamenu for osCommerce. All the CSS declarations for various menu styles
are included below. You need only include the style for the type of menu you plan
to use in your store template (of course feel free to paste them all in if experimenting).

The plain and DHTML menus also work with a set of templates found in the
/includes/functions/dynamenu/templates folder, but in just about all cases
modifying the styles below should net you the results you want. 

*/



/*-------------------------------------*/
/*   Horizontal Drop-Down Menu Style   */
/*-------------------------------------*/

.horbar	{   /* Color of main horizontal menubar and border */
color: black;
background-color: #e6e7e6;
border: 1px outset #525252;
}

.horizitem	{		  /* Behaviour of main horizontal menu items, leave as is for proper operation */
float: left;
white-space: nowrap;
}

.horizitem a {			  /* Font style, size of submenu items */
 font-family: Verdana, Arial, sans-serif;
font-size: 12px;	
text-decoration: none;
position: relative;	
display: block;	
}

.horizitem a:link, .horizitem a:visited 	{	  /* Font style & color of main menu items */
color: #000000;
text-decoration: none;
}

.horizitem a:hover	{	   /* Font style & color, background menu color of main menu item when hovered over */
color: #ffffff;
background-color: #21459c;
text-decoration: none;
}

.horizitem a:active	{	   /* Font style & color, background menu color of main menu item when clicked */
color: #ffff00;
background-color: #666666;	
text-decoration: none;
}

.horizsubmenu	{	   /* Behaviour of sub-menu items - leave as is for proper operation of submenus */
position: absolute;
left: 0;
top: 0;
visibility: hidden;
}

.horizsubframe	{	  /* Color of submenu item and border */
background-color: #e6e7e6;
border: 2px outset #fdfefd;

position: relative;
display: block;	
}

.horizsubitem	{	   /* Behaviour of sub-menu items - leave as is for proper operation of submenus */
text-align: left;
white-space: nowrap;
}

.horizsubitem a {			/* Font style, size of submenu items */
 font-family: Verdana, Arial, sans-serif;
font-size: 12px;	
text-decoration: none;

position: relative;
display: block;	
}

.horizsubitem a:link, .horizsubitem a:visited	{	   /* Font color, style of submenu items */
color: #000000;
font-size: 12px;	
text-decoration: none;
}

.horizsubitem a:hover	{	  /* Font color, style, background submenu color of submenu item when hovered over */
color: #ffffff;
background-color: #21459c;
text-decoration: none;
}

.horizsubitem a:active	{	  /* Font color, style, background submenu color of submenu item when clicked */
color: #ffff00;
background-color: #666666;		
text-decoration: none;
}

.horizsubitem .horizfwdarr, .horizitem .horizfwdarr	{	  /* Positioning of right arrow for submenus */
position: absolute;
top: 5px;
right: 8px;
}

.dmselected {   /* Style override for selected category tree */
background-color: #ccc;
	font-weight: bold;
}

.horbar .dmselected {   /* Style override for selected root category */
background-color: #999;
}


/*---------------------------------*/
/*   Vertical Fly-Out Menu Style   */
/*---------------------------------*/

.verbar	{   /* Color of main vertical menubar and border */
color: black;
background-color: #e6e7e6;
border: 1px outset #fdfefd;
}

.vertitem	{		  /* Behaviour of main vertical menu items, leave as is for proper operation */
text-align: left;
white-space: nowrap;
}

.vertitem	a {   /* Font style, size of main menu items */
 font-family: Verdana, Arial, sans-serif;
font-size: 12px;		
text-decoration: none;
position: relative;
display: block;		
}

.vertitem a:link, .vertitem a:visited	{   /* Default font style & color of main menu items */
color: #000000;
text-decoration: none;	
}

.vertitem a:hover	{   /* Font style & color, background menu color of main menu item when hovered over */
color: #ffffff;
background-color: #21449c;
text-decoration: none;
}

.vertitem a:active	{   /* Font style & color, background menu color of main menu item when clicked */
color: #ffff00;
background-color: #666666;	
text-decoration: none;	
}

.vertsubmenu	{   /* Behaviour of sub-menu  - leave as is for proper operation of submenus */
position: absolute;
left: 0;
top: 0;
visibility: hidden;
}

.vertsubframe	{   /* Color of submenu item and border */
background-color: #e6e7e6;
border: 2px outset #fdfefd;

position: relative;
display: block;	
}

.vertsubitem	{	 /* Behaviour of sub-menu  - leave as is for proper operation of submenus */
text-align: left;
white-space: nowrap;
}

.vertsubitem a	{   /* Font style, size of submenu items */
 font-family: Verdana, Arial, sans-serif;
font-size: 12px;			
text-decoration: none;

position: relative;
display: block;	
}

.vertsubitem a:link, .vertsubitem a:visited	{   /* Default font style & color of submenu items */
color: #000000;
text-decoration: none;	
}

.vertsubitem a:hover	{   /* Font style & color, background submenu color of submenu item when hovered over */
color: #ffffff;
background-color: #21449c;
text-decoration: none;
}

.vertsubitem a:active	{   /* Font style & color, background submenu color of submenu item when clicked */
color: #ffff00;
background-color: #666666;	
text-decoration: none;			
}

.vertsubitem .vertfwdarr, .vertitem .vertfwdarr	{   /* Positioning of right arrow for submenus */
position: absolute;
top: 5px;
right: 8px;
}

.dmselected {   /* Style override for selected category tree */
background-color: #ccc;
	font-weight: bold;
}

.verbar .dmselected {   /* Style override for selected root category */
background-color: #999;
}

/*---------------------------*/
/* Tree and Plain Menu Style */
/*---------------------------*/

.treemenudiv	{	 /* Behaviour of tree/plain menu item - leave as is for proper performance */
display: block;
white-space: nowrap;
}


.phplmbodytable { /* Class of table cells containing plain menus */

}

.phplmnormal {	 /* Font size & color of unlinked menu items */
color: #000000;
font-size: 13px;	
text-decoration: none;	
}


a.phplm:link, a.phplm:visited	{	  /* Font color, style of linked & visited menu items */
color: #003300;
font-size: 13px;	
text-decoration: none;	
}


a.phplm:hover	{	  /* Font color, style of menu items when hovered over */
color: #841212;
background-color: #ccc;
font-size: 13px;	
text-decoration: none;	
}

a.phplm:active	{	  /* Font size & color of menu items when clicked */
color: #ff0000;
font-size: 13px;	
text-decoration: none;	
}

.dmselected {   /* Style overide for selected category tree */
background-color: #ccc;
	font-weight: bold;
}


?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Share this post


Link to post
Share on other sites

Great contrib,

 

Is there anyway off excluding certain cPath links and sub links from being produced in the menu.

 

I have a menu item called logs, which cPath=25 and I would like it not to show in the menu, it also has a sub menu called wet logs cpath=25_35

 

Any ideas??

Share this post


Link to post
Share on other sites

Hi

 

Is there any way to keep the style of horizitem while hovering the horizsubmenu?

 

thanks


?,???`???,?? God must love stupid people, he made so many ??,???`???,?

Share this post


Link to post
Share on other sites
I finally found a solution the problem of subcategories not showing when using STS templates with dynamenu

 

The following line does not work when placed in the footer.php but needs to go into application_bottom.php before the last ?>

 

// Output the footer for Dynamenu for osCommerce

echo $GLOBALS['dmfooter'];

 

Hope this helps a few of you.

just to say a huge THANKS to rhurd for posting this trick about dynamenu with sts, it saved me I don't know how many days. thanks thanks thanks, this is how a forum has to work.

see you

Share this post


Link to post
Share on other sites

Have tried adding this

 

/***************** start *************************/

$pattern = '/^29$|^29_\d+$/';

if(isset($cpath_array)){

foreach ($cPath_array as $key => $value){

if(preg_match($pattern, $key)){

unset($cpath_array[$key]);

}

}

}

 

/*****************end *******************************/

 

below the global $cPath_array, $menu_use_titles, $menu_icon_file, $divide_subcats, but doesnt work??

 

where is the a href links created and called?

 

 

Regards

 

 

gerard

Share this post


Link to post
Share on other sites

Nathan,

 

I would like to say THANK YOU!!! for creating a categories menu system that is easy to install regardless of the other contributions one may be using on their site. I can't tell you how many days I have been working on finding a good categories menu system (or how many other contrib's I tried to no avail) before trying this one. IMHO - this contrib should become standard with the next release of osC!

 

One thing I think would be great to see, is a version of this menu for the Information Box. I would like to have "About Us" as a link, and then have a drop down under it for the Shipping & Returns, Privacy Notice and Conditions of Use pages. Is there an easy way to modify the current script to create a separate dm_information.php page to do this with?

 

Thanks again!

Tracy


~Tracy
 

Share this post


Link to post
Share on other sites
Is there anyway off excluding certain cPath links and sub links from being produced in the menu.

 

I have a menu item called logs, which cPath=25 and I would like it not to show in the menu, it also has a sub menu called wet logs cpath=25_35

Look in the tep_make_cat_dmbranch function, where the categories are being parsed... Just before the $output is assigned, I think you could add something like

if ($GLOBALS['cPath_set'][0] == '25')
continue;

Assuming cat #25 is a "root" category. Otherwise, change the zero to 1, 2, etc... depending on what sublevel the category is on... Haven't tried it, but something along those lines...

 

 

Is there any way to keep the style of horizitem while hovering the horizsubmenu?

Yes, you should be able to make those types of style adjustments by the stylesheet..

 

One thing I think would be great to see, is a version of this menu for the Information Box. I would like to have "About Us" as a link, and then have a drop down under it for the Shipping & Returns, Privacy Notice and Conditions of Use pages. Is there an easy way to modify the current script to create a separate dm_information.php page to do this with?

Well, nothing worth doing is easy :) Check out my response to jimmygreaves back on post #65 of this thread...

 

Just wanted to say that all the examples I've seen are really wonderful looking. Thanks to fellow forum posters for pitching in and helping, as for whatever reason I can't get this dang forum to send me subscription notifications :(

 

 

Just a quick tip - if your submenus aren't working or look funny, 9 times out of ten it is because you are not outputting your Dynamenu "footer" in your template(s), or you forgot to include the DM stylesheet in your osCommerce styles...


** Please do not PM with personal support requests (even if offering "payment"). Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×