Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Dynamenu" for osCommerce


Recommended Posts

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.

 

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/

~Tracy
 

Link to comment
Share on other sites

Hi..

I have got a strange problem here after installing Dynamenu. I'm using STS.

The menu is showing up ok and almost all menuchoices are working, but NOT those containing Norwegian chars:

I have in Norwegian: "Skotøy" (In english this is "Footwear")

I can not get the link for this menuchoice to work since it is showing up like this:

http://www.emti.no/catalog/skotøy-c-38.html

and it should show:

http://www.emti.no/catalog/skotøy-c-38.html

(I hope the diff shows up in this post)

 

This link is showing right and working ok when not using Dynamenu.

 

Could someone please help me with this?

 

regards

sijo

Link to comment
Share on other sites

Hi..

I have got a strange problem here after installing Dynamenu. I'm using STS.

The menu is showing up ok and almost all menuchoices are working, but NOT those containing Norwegian chars:

I have in Norwegian: "Skotøy" (In english this is "Footwear")

I can not get the link for this menuchoice to work since it is showing up like this:

http://www.emti.no/catalog/skotøy-c-38.html

and it should show:

http://www.emti.no/catalog/skotøy-c-38.html

(I hope the diff shows up in this post)

 

This link is showing right and working ok when not using Dynamenu.

 

Could someone please help me with this?

 

regards

sijo

 

 

Sorry, forget this post. It was the Ultimate SEO that caused the problem...

Link to comment
Share on other sites

Just a bump to see if anyone has any ideas on this one ;)

 

I've hit a challenge I'm not sure I can figure out - LOL

 

I helped with creating the "Product in Dynamenu" contribution add-on - but I can't seem to find how to setup the "split menu" type feature in the products listing. It is a sub menu - but it doesn't seem to work to just split the sub menus, I think I need to change something in the addition of the products as sub menus. Any thoughts on how to do this?

~Tracy
 

Link to comment
Share on other sites

Yes - just change the stylesheet info to what you want. The look is set through the CSS.

 

Oh, now I see that there's special css style class for subitems of Horizontal Drop-Down Menu and Vertical Fly-Out Menu. But I'm using Tree Menu and there's no style class for subitems in that type :(

Sorry for my english...

Link to comment
Share on other sites

I've never used tree menu, and there doesn't seem to be a template for tree menu either. You might have to find where the script is that is creating the look of the tree menu and see if you can add a <span class="myclass"> </span> bit around the subitem script and then create that class in your stylesheet.

 

 

Oh, now I see that there's special css style class for subitems of Horizontal Drop-Down Menu and Vertical Fly-Out Menu. But I'm using Tree Menu and there's no style class for subitems in that type :(

~Tracy
 

Link to comment
Share on other sites

Are you using a template contribution? Are you showing the menu as a div or in a table?

 

What is the proper code to add, and where if wanting to center the menu bar? I read already that you can add a center alignment value earlier in this thread but nobody specified where and how. I'm very new to php and need the help, thanks!

~Tracy
 

Link to comment
Share on other sites

Are you using a template contribution? Are you showing the menu as a div or in a table?

 

No I'm not using STS or BTS, no templates. What I have done is replaced the categories box in my column_right.php with this contribs box so that it appears on the right side. It can be seen at http://goldmonger.net

 

The code in my column_right.php is

 

<?php

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'dm_categories.php');

}

?>

Link to comment
Share on other sites

If you are looking to center the entire dynamenu table you can try going into includes/boxes/dm_categories.php and changing this area:

 

// 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 CategoriesBoxHeading($info_box_contents, true, false);					
}

 

You can add your align="center" or valign="center" to the <td> to center the entire dynamenu table within the table cell it is being put into.

 

No I'm not using STS or BTS, no templates. What I have done is replaced the categories box in my column_right.php with this contribs box so that it appears on the right side. It can be seen at http://goldmonger.net

 

The code in my column_right.php is

 

<?php

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'dm_categories.php');

}

?>

~Tracy
 

Link to comment
Share on other sites

Ok - I am still having some problems trying to split the products in the menu. I think it has to do with how or where the products are being counted - but I'm not positive. Here is what I have for my includes/boxes/dm_categories.php - notice the script towards the bottom of the page to split products (tried to copy the split subcats script but something isn't working right).

 

<?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 (c) 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;	
$divide_pic = 5;

// 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...';
$divide_pic_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 CategoriesBoxHeading($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 . 
							 '<div id="catmenu" class="verbar2"><div id="refL201" class="vertitem "><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a></div>' . 
							 '<div id="refL202" class="vertitem "><a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . HEADER_TITLE_TOP . '</a></div></div>'
							 );
   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, $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');

	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) {

// globals changed for SPPC and products in menu too
   global $cPath_array, $menu_use_titles, $menu_icon_file, $divide_subcats, $divide_subcats_text, $customer_group_id, $pic;

	$lvl_adjust = 1;
	$lvl_adjust2 = $level+2;

   $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 ++;
                                               $lvl_adjust2 ++;
			}

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

//BOF product listing
$_products_in_category_array = $pic->getProductsInCategory($key);

//$products_in_category_count = tep_count_ProductsInCategory($key);
// returns false if no products in the category
   if ($_products_in_category_array != false) {
       $products_in_category_array = $_products_in_category_array;


foreach ($products_in_category_array as $array_key => $products_in_category) {

$product_id_h = 'products_id='.$products_in_category ['products_id'];
$product_name_h = $products_in_category ['products_name'];

if ($GLOBALS['products_id'] == $products_in_category ['products_id']) {
$that_expanded = '1';
$that_selected = 'dmselected';
} else {
$that_expanded = '';
$that_selected = '';
}

if ($menu_use_titles) {
$that_title = $product_name_h;
} else {
$that_title = '';
}


// Add "more" submenu if dividing subcategories

           if ($products_in_category > divide_pic && divide_pic ) {
           $output .= str_repeat(".", $lvl_adjust2).'|'.$divide_pic_text.'||'.$product_name_h.'|'.tep_href_link(FILENAME_PRODUCT_INFO, $product_id_h).'|'.$that_title.'|'.$menu_icon_file.'|'.$that_selected.'|'.$that_expanded."\n";							 
			    $products_in_category = 1;
				    $lvl_adjust ++;
					$lvl_adjust2 ++;
			}

$output .= str_repeat(".", $lvl_adjust2).'|'.$product_name_h.'|'.tep_href_link(FILENAME_PRODUCT_INFO, $product_id_h).'|'.$that_title.'|'.$menu_icon_file.'|'.$that_selected.'|'.$that_expanded."\n";
}// end if ($_products_in_category_array != false)
} //EOF product listing

       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;
}	
?>

 

Any ideas on how to properly count the $products_in_category for this to work? I don't think it really should be within the 'foreach ($products_in_category_array as $array_key => $products_in_category) {' statement (at least in other spots it seems to follow after the foreach statement) but I don't know where else to count this at.

 

The '$_products_in_category_array = $pic->getProductsInCategory($key);' bit is referencing a page located at includes/classes/ProductsInCategory.php Towards the bottom of this page the counting has been done - but I don't know how to call that count into the dm_categories.php page - the script where the count has been done looks like this:

 

        function getProductsInCategory($categories_id) {
           if (isset($this->pic_data[$categories_id])){
               foreach ($this->pic_data[$categories_id] as $key => $_product_data) {
                   $product_data[] = $_product_data;
                   } // end foreach
                        return $product_data;
					 $pic_count = count($product_data);
               }else{
       return false;
                          }

       } // end function getProductsInCategory($categories_id)

 

Is there an easy way to get the $pic_count into dm_categories.php for use in the divide function ?

~Tracy
 

Link to comment
Share on other sites

If you are looking to center the entire dynamenu table you can try going into includes/boxes/dm_categories.php and changing this area:

 

// 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 CategoriesBoxHeading($info_box_contents, true, false);					
}

 

You can add your align="center" or valign="center" to the <td> to center the entire dynamenu table within the table cell it is being put into.

 

 

I added the code like this but it didn't center my table.

 

echo '<td align ="center">';

 

I also tried echo '<tr><td align="center">'; and this didn't work. I'm not sure if it's because it's the wrong code syntax or not.

Link to comment
Share on other sites

If adding the alignment to includes/boxes/dm_categories.php doesn't work, then it's being set through the stylesheet. What is your CSS for the main menubar?

 

I added the code like this but it didn't center my table.

 

echo '<td align ="center">';

 

I also tried echo '<tr><td align="center">'; and this didn't work. I'm not sure if it's because it's the wrong code syntax or not.

~Tracy
 

Link to comment
Share on other sites

Well in my stylesheet I don't have anything to tell the category box what position to be in. I only have the code for the horizontal menubar that I pasted from the install directions. There's nothing in the column_right.php about positioning either. Could it be elsewhere?

Link to comment
Share on other sites

During the install instructions it has you paste the CSS into your stylesheet. You might need to go back through the instructions and find that step ;)

 

Well in my stylesheet I don't have anything to tell the category box what position to be in. I only have the code for the horizontal menubar that I pasted from the install directions. There's nothing in the column_right.php about positioning either. Could it be elsewhere?

~Tracy
 

Link to comment
Share on other sites

I have a quick question...

How can I put an image to the left of Dynamenu?

 

I've tried pasting

"<img

align="top" src="images/addons/dmbackright.png" width="8" height="32" border="0"

alt="Menu" />

"

All over the place but I think I'm missing something.

 

I Can get it on the right but no luck sofar with left..

Below is an image, RED where I'd like to put it, Orange what I have succeeded in sofar:

dmenu.jpg

"I have no special talent. I am only passionately curious"

- Albert Einstein

Link to comment
Share on other sites

I'd try just adding the img in the template (includes/functions/dynamenu/templates) horizontal_menu not horiz_sub_menu. Of course, in the template it mentions the icon - not sure how to set an icon, but you could try saving this file as a backup first, and then changing the "icon" bits to your dmbackright.png info and saving that as the template to give it a try (that way you still have the original backup up).

 

I have a quick question...

How can I put an image to the left of Dynamenu?

 

I've tried pasting

"<img

align="top" src="images/addons/dmbackright.png" width="8" height="32" border="0"

alt="Menu" />

"

All over the place but I think I'm missing something.

 

I Can get it on the right but no luck sofar with left..

Below is an image, RED where I'd like to put it, Orange what I have succeeded in sofar:

dmenu.jpg

~Tracy
 

Link to comment
Share on other sites

Hmm. I just upgraded from MS2 to RC2a. It worked fine at first then I refreshed the page after removing/adding new products and this happened:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/goldmo5/public_html/buy/includes/application_top.php on line 340

 

Line 340 is this

  $navigation->add_current_page();

 

I'm using the tree menu. Any ideas?

Edited by christianbright
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Well I fixed my previous issue. Now I would like to know, how would one remove the subcategories from the dynamenu categories menu??? I installed the update to include the function for this but when I enter numbers (lots of trial and error) none of my subcats get hidden...

Edited by christianbright
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...