Jump to content
Sign in to follow this  
nate_02631

"Dynamenu" for osCommerce

Recommended Posts

I was able to use Hide Products and Categories for Separate Pricing Per Customer contribution and just edit the queries for Dynamenu accordingly and it worked great!! :thumbsup:

 

I wil install that contribution, but adapting the queries is too much for mee, i am very rookie in php/oscommerce

Share this post


Link to post
Share on other sites
I wil install that contribution, but adapting the queries is too much for mee, i am very rookie in php/oscommerce

 

Which Hide Products and Categories contribution you install depends on whether or not you have Separate Pricing Per Customer installed.

 

Once you know which contribution you need - you would just edit the queries in the dynamenu files in much the same way as the instructions will have you edit other queries. Let us know when you get installed to the point where you're ready to work on the Dynamenu queries and I'll do my best to help you out :)


~Tracy
 

Share this post


Link to post
Share on other sites

I am using this menu and am very happy with the exception of one thing. The categories are not in alphabetical order which makes navigation difficult. Is there a way to fix this?

Share this post


Link to post
Share on other sites

hello first of all this contribution rocks 10x

 

i have 2 problems if anyone can help please do.

 

1. the first category doesn't expand when i click it

2. could it be possible that when i click a category it only expands and does not act like a ling to the category page ?

 

thank you

Share this post


Link to post
Share on other sites

Hi,

 

When I add an item to my cart and I click checkout or my account (any page on https://), the page is giving me this error:

 

tal error: Cannot redeclare tep_make_cat_dmlist() (previously declared in /home/daylight/www/www/includes/boxes/dm_categories.php:220) in /home/daylight/www/www/includes/boxes/dm_categories.php on line 255

 

Can someone help me fix this? Please tell me what to do?

 

Thanks for your help,

Daysi Gonzalez

DaylightGifts.com

Owner

Share this post


Link to post
Share on other sites

Hi

 

I am running the Multi-store contribution, and are having problems to implement Dynamenu. When installing this out of the box, the Dynamenu showed categories for all stores.

Then i change the query in dm_categories.php from:

 

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

 

to

$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 = '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 ."' ".$parent_query."order by sort_order, cd.categories_name");

 

taken from original modded categories.php.

But when i do this it only shows top category, not the subcategories.

 

Anyone can help out here? Thx...

Share this post


Link to post
Share on other sites

Hi, This is an AWESOME contribution!! There is one thing I am wondering though. Right now it looks like this:

 

Main Category

Sub Category

Sub Category

 

Is there any way I can make it display as:

 

Main Category

Sub Category

Product Link

 

Because if at all possible, I would like to be able to either a) Eliminate the Sub Categories altogether, or, be able to display them both in the submenu. I saw a contribution for display products as well, but it looks like it was made for an older version of this code, and it doesn't work at all. Thanks for any help!!

Share this post


Link to post
Share on other sites
Which Hide Products and Categories contribution you install depends on whether or not you have Separate Pricing Per Customer installed.

 

Once you know which contribution you need - you would just edit the queries in the dynamenu files in much the same way as the instructions will have you edit other queries. Let us know when you get installed to the point where you're ready to work on the Dynamenu queries and I'll do my best to help you out :)

 

Hello again

 

I have already installed the Hide Products and Categories contribution for SPPC ...

I only need indications to put the Dynamenu working with it,

 

I thank for your help

 

tks

Share this post


Link to post
Share on other sites

EASY INSTALL, Slight Problem. The first category is in BOLD text?? I uploaded the different styles to the style sheet but how do I get to the screen toware i can change the properties...THANKS!!! I.E. Like toware it is justa tree and not the slide out version

 

Here is the website for you to look at so you know what I am talking about:

 

www.GiellaCustoms.com/store

Edited by giellacustoms

Share this post


Link to post
Share on other sites
Hi

 

I am running the Multi-store contribution, and are having problems to implement Dynamenu. When installing this out of the box, the Dynamenu showed categories for all stores.

Then i change the query in dm_categories.php from:

 

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

 

to

$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 = '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 ."' ".$parent_query."order by sort_order, cd.categories_name");

 

taken from original modded categories.php.

But when i do this it only shows top category, not the subcategories.

 

Anyone can help out here? Thx...

 

Ok, i think i solved it.

 

Following query seems to pick out right categories when running multi-store addon:

$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 . ' cc where c.categories_id = cd.categories_id and c.categories_id = cc.categories_id and cc.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 all,

 

I tried searching this pst but there where so many replies that i must have mist it.

 

I'm trying to limit the menu to a set of first level category id's.

 

$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 IN (184,185,195) and c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query. 'order by sort_order, cd.categories_name');

 

When I use this query I get the requested menu items but they won't fold out. (the subcategories don't come up when hovering).

 

Any one with an idea on how I could get this to work fully?

 

Fixed it,

 

i guess my query was wrong anyways I used this work around.

 

in the dm_categories.php file find this

 

while ($row = tep_db_fetch_array($result)) {				
	$table[$row['parent_id']][$row['categories_id']] = $row['categories_name'];
}

 

and I replaced that with

 

while ($row = tep_db_fetch_array($result)) {
	if ($row['categories_id'] != 174) {				
	$table[$row['parent_id']][$row['categories_id']] = $row['categories_name'];
}}

 

The if statement could be altered to include a list of categorie Id's, in my case I just tell the code not to make a menu for the categorie_id 174.

Edited by dimi78

Share this post


Link to post
Share on other sites

can someone explain to me how I go about changing the settings to this. I installed it and it works GREAT but I would like to change some minor things to it. like colors and such. THANKS

 

What directory or setting is it located in?

Share this post


Link to post
Share on other sites

First of all, I'm as new a newbie as you can get. My background is in HTML with a few borrowed javascript and dhtml installations here and there. I've managed to get my store looking pretty much how I want it, but I needed to change the default menu format (gawd, could it be more awful?).

 

If the answer to my problem already exists in the forum, I apologize...I looked and looked and looked.....

 

I have installed Dynamenu Tree style, and it works fine (none of the bugs I see mentioned in the forum), but because some of my category names are a little on the long side, the menu box gets resized depending on the main category that's expanded. Of course, the quick fix would be to rename all my categories with shorter names, but I really don't want to have to do that.

 

I saw the contribution Product Name Limiter by timidphper, and it seems to be the perfect solution for me, but it creates a fatal error for the site.

 

The thing I noticed that was strange was that when I went to "replace" the ProductsInCategory.php file, I found that I didn't have one to begin with. I uploaded the new one, but I'm wondering if the OsC download has changed since this contribution and that file no longer exists, and therefore the supporting code in other files may no longer exist. Could this be the problem? Has the program changed that much?

 

Can anyone tell me what I'm missing or what I need to do? I really like the idea of the category truncation.

 

By the way, thanks for the original contribution, Nate!

Share this post


Link to post
Share on other sites

Hi Nate,

 

Thank you for this wonderful contribution! I am rebuilding my web store with OSC. I am PHP literate! I have one question though, what file do I need to put the following link code in? I can't seem to find the file for it or a post that goes with it.

 

$mid->setMenuStructureString(".|Home|index.php|Home|||\n".$categories_string);

 

Thanks for your help!

Share this post


Link to post
Share on other sites
Hi Nate,

 

Thank you for this wonderful contribution! I am rebuilding my web store with OSC. I am PHP literate! I have one question though, what file do I need to put the following link code in? I can't seem to find the file for it or a post that goes with it.

 

$mid->setMenuStructureString(".|Home|index.php|Home|||\n".$categories_string);

 

Thanks for your help!

 

I was able to get the HOME link on the menu bar ( I am using the horizontal). Could someone anyone send me what the PHP should look like in the dm_catagories file if you are adding links to the end of the menu bar after the catagories?

 

Thanks ahead of time!

 

~Blessings & Peace,

 

IPT

Share this post


Link to post
Share on other sites

1st of all great idea for a contrib.

I am working with a fresh install of osCommerce. No contribs installed.

viewing the site in ie7

When I add the contrib all seems fine, the 1st level of categories shows up fine except the remaining categories are printed in the footer of the site?

(I assume this is because of the echo line added at the end of the footer)

anyone got any ideas?

regards,

Will

Share this post


Link to post
Share on other sites

I had the same problem, but can´t remember how I fix it.

 

My code in dm_categories.php:

 

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

 

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

 

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

$menu_use_titles = false;

 

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

$menu_icon_height = 11;

 

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

$menu_downarrowimg = '/down-arrow.gif';

 

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

 

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

 

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

$GLOBALS['dm_tree_folder_icons'] = false;

 

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

 

// END Configuration Options

 

And My css

 

/*   Horizontal Drop-Down Menu Style   */
/*-------------------------------------*/
.horbar	{   /* Color of main horizontal menubar and border */
color: #d5d5d5;
background-color: #000000;
border: 1px solid #000000;
}

.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: 13px;	
text-decoration: none;
position: relative;	
display: block;	
padding:5px 2px;
}

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

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

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

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

.horizsubframe	{      /* Color of submenu item and border */
background-color: blue;
border: 1px solid #000000;
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: 13px;	
text-decoration: none;
position: relative;
display: block;	
padding:3px;
}

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

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

.horizsubitem a:active	{      /* Font color, style, background submenu color of submenu item when clicked */
color: #00cc00;
background-color: #000000;		
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: #000000;
	font-weight: normal;
}

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

Share this post


Link to post
Share on other sites

Still not fixed.

 

This is the end of my footer:

 

<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
  // Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];
?>
</td>
 </tr>
</table>
</div>

 

My CSS sheet includes both vertical and horizontal, and all th images and files are added for CONTRIBUTION "Dynamenu for osCommerce v 1.1.1 (05/27/06)" by Nathan Welch.

 

PLEASE HELP

Share this post


Link to post
Share on other sites

getting error message:

 

Warning: Variable passed to each() is not an array or object in /home/nickalls/public_html/cart/includes/boxes/dm_categories.php on line 254

LayersMenu Error: setMenuStructureString: empty string.

Halted.

 

how do i fix this up?? Please help!

Share this post


Link to post
Share on other sites
Still not fixed.

 

This is the end of my footer:

 

<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
  // Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];
?>
</td>
 </tr>
</table>
</div>

 

My CSS sheet includes both vertical and horizontal, and all th images and files are added for CONTRIBUTION "Dynamenu for osCommerce v 1.1.1 (05/27/06)" by Nathan Welch.

 

PLEASE HELP

 

 

have youy tried putting echo $GLOBALS['dmfooter']; after the div, as you have it in a table right now that might effect it, browsers load everthing in tables first.

 

Rember to enclose in <php? ?>

 

;)


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Great little menu!

 

I need to minimise the width to fit my layout, I`m using Vertical Fly-Out Menu

I`ve cut font to 9px, removed the box & moved arrow`s left

I now have empty space filling box to right of menu text, I cant find anywhere to set max size of box.

There is nowhere in CSS to do with width.

 

Please help :'(


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi.

 

Fantastic contrib, but I search one "special" type of tree the categories.

 

So I've the Categories list

 

CAT1

CAT2

CAT3

 

And when I click on one categories I would like that the categories were displayed like this

 

BACK

CAT1

-SUBCAT1

-SUBCAT2

-SUBCAT3

 

Same way if I click on one subcategories

 

Ther's any way to do this whit Dynamenu?

 

Many tnx, jo.

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  

×