Jump to content
Sign in to follow this  
nate_02631

"Dynamenu" for osCommerce

Recommended Posts

Hi Bill

 

Seems, i have the same problem as Eric (Dynatech) has got.

I wanted to use STS too with dynamenu. (STS 4.3)

 

I have done really EVERYTHING as you told and much more to get it running.

I even did put the menu into a layer, because someone wrote, that tables would confuse the menu.

 

Same problem: Menu doesnt fly out. (Horizontal menu)

 

BUT: it is not the problem of stylesheet or somthing else.

The VERTICAL menu functions correctly with fly out.

Both, the vertical AND horizontal work perfect, when not using STS

 

 

 

 

I have got some failure-messages from a developper-tool for firefox:

 

The messages:

moveLayerX1 is not definded (http://my.domain.at/index.php) line: 1

clearMTO is not defined (http://my.domain.at/index.php) line: 1

setLMTO is not defined (http://my.domain.at/index.php) line: 1

 

Can you deal with the failures?

I dont understand them.

 

Could you help me out?

If you want to see the site, where it doesnt function, just tell me

 

Thank you very much

Christoph

Share this post


Link to post
Share on other sites
Thanks Nate, but still really trying and still really battling ...

I'm trying to set one specific top level category to be non-linked ... just the title showing with the linked subcategories showing underneath upon mouseover.

 

The '<a href' seems to come from the template file 'layersmenu-horizontal_menu.ihtml' . ( or not??)

It seems you did not read the above post carefully. The links comes from the tep_href_link function call in the script... It is here where you can control whether or not a menu "node" is linked or not...

 

(the templates nor osC use Smarty - whatever gave you that idea?)


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

Share this post


Link to post
Share on other sites

Hey guys, I know its prob in this forum somewere but i can't find it and even googled it! I was wondering wich line is it or how to i say add a background image so my links sit on it? Does this make cents? Im using the horizontal, and it workds great, just trying to tweak it now. Thank

 

Jon


===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites
how to i say add a background image so my links sit on it?

You can adjust the Dynamenu stylesheet to include a background image...


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

Share this post


Link to post
Share on other sites
It seems you did not read the above post carefully. The links comes from the tep_href_link function call in the script... It is here where you can control whether or not a menu "node" is linked or not...

 

(the templates nor osC use Smarty - whatever gave you that idea?)

 

smarty? just grasping at straws i guess.

 

i've removed the tep_href_link function call in the code below and the menu nodes still show as links but just without an actual address (<a href="index.php?osCsid...) ... because the template has the <a href> in it.

 

// original code

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

// code with tep_href_link call removed.

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

 

i'm trying to achieve the image below whereby 'women' is shown but is not a link.

bottoms etc would be linked.

please please help with code as to how to show the title without it being linked.

 

menu_screenshot.gif

Share this post


Link to post
Share on other sites
Hi Bill

 

Seems, i have the same problem as Eric (Dynatech) has got.

I wanted to use STS too with dynamenu. (STS 4.3)

 

I have done really EVERYTHING as you told and much more to get it running.

I even did put the menu into a layer, because someone wrote, that tables would confuse the menu.

 

Same problem: Menu doesnt fly out. (Horizontal menu)

 

BUT: it is not the problem of stylesheet or somthing else.

The VERTICAL menu functions correctly with fly out.

Both, the vertical AND horizontal work perfect, when not using STS

I have got some failure-messages from a developper-tool for firefox:

 

The messages:

moveLayerX1 is not definded (http://my.domain.at/index.php) line: 1

clearMTO is not defined (http://my.domain.at/index.php) line: 1

setLMTO is not defined (http://my.domain.at/index.php) line: 1

 

Can you deal with the failures?

I dont understand them.

 

Could you help me out?

If you want to see the site, where it doesnt function, just tell me

 

Thank you very much

Christoph

 

Have you made the changes to your includes/modules/sts_inc files (ie - sts_column_left and sts_footer) the same way that you make them to the column_left and footer pages outside of STS?


~Tracy
 

Share this post


Link to post
Share on other sites
You can adjust the Dynamenu stylesheet to include a background image...

 

Could you just give me a basic .css code that would allow this, and alos, how do i get it so the $show_dmcats_as_box = true;, witdth is smaller? Im trying to fit it now in my vert bar, i like it better there, but ther problem is the width of the box is too long... Thank

 

Jon


===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites
i'm trying to achieve the image below whereby 'women' is shown but is not a link.

bottoms etc would be linked.

That's the idea... though you shouldn't have a filename in there (or maybe just a pound sign)... and use conditional checks to output this as link or that as not. There will be an a href in the output for the non-link - just make it null...

 

Have you made the changes to your includes/modules/sts_inc files (ie - sts_column_left and sts_footer) the same way that you make them to the column_left and footer pages outside of STS?

In a nutshell, if the submenus aren't showing, you footer is not being output - look in the bottom of the page output to see if it is so, then work the problem from there.

 

Could you just give me a basic .css code that would allow this, and alos, how do i get it so the $show_dmcats_as_box = true;, witdth is smaller?

Both of these things can be accomplished easily with stylesheets... seek out CSS resources on the web for more info.


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

Share this post


Link to post
Share on other sites
Both of these things can be accomplished easily with stylesheets... seek out CSS resources on the web for more info.

 

Thanks for the help so far, i have another question for you, lets say i don't want the arrows for the vert bar, how do i change the settings so they don't even show up? Thank


===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites
Thanks for the help so far, i have another question for you, lets say i don't want the arrows for the vert bar, how do i change the settings so they don't even show up? Thank

You could set the arrow classes in the stylesheet to not display, or tweak the code in the DM templates to remove them altogether...


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

Share this post


Link to post
Share on other sites
You could set the arrow classes in the stylesheet to not display, or tweak the code in the DM templates to remove them altogether...

 

Thanks for the info, One more question then im all setup... The width issue, i read alittle bit about it in the forums, but really not getting it. If you go My webpage on the left side is my menu, now do u see how the width is not correct, and throwing the rest of my tables off? I tried using the $show_dmcats_as_box = false;, but i couldn't figure were the settings were for the table width, that just made it worse. So i went ahead and used $before_nobox_html = '';

$after_nobox_html = ''; and put in my own tags. So i even tried to set the table with within these tags, but no luck. And is it possible to do text wrap when i do set the width of the table? Thank....

 

<tr><td width="207">
<?php include(DIR_WS_BOXES . 'dm_categories.php'); ?>
</td></tr>


===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites

The menu items are non-wrapping (and can't/shouldn't be made to wrap)... Best solution would be to make your "root" category names shorter or the root menu text smaller/more tightly spaced... You can set an absolute width, I think with the .horbar/.verbar classes, but the menu text would likely stretch it out... (but a good idea nonetheless)


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

Share this post


Link to post
Share on other sites
The menu items are non-wrapping (and can't/shouldn't be made to wrap)... Best solution would be to make your "root" category names shorter or the root menu text smaller/more tightly spaced... You can set an absolute width, I think with the .horbar/.verbar classes, but the menu text would likely stretch it out... (but a good idea nonetheless)

 

Thank for the suggestions, gerat contrib, will def donate, when all is running good. Thank for the hard effort!

 

Jon


===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites
The menu items are non-wrapping (and can't/shouldn't be made to wrap)... Best solution would be to make your "root" category names shorter or the root menu text smaller/more tightly spaced... You can set an absolute width, I think with the .horbar/.verbar classes, but the menu text would likely stretch it out... (but a good idea nonetheless)

 

Shortening the root menu names worked great.... Now all my tables are good. Thank

Edited by JJ21

===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites

Hi again, i was wondering if someone could help me out, go to My Webpage and check out my menu on left side, now when you go over say Appariel and fasshion, the sub menu is so far out to the right, how do i get that to be closer? Thanks

 

Jon


===========================

Remember Always Back UP!

___________________________________

Share this post


Link to post
Share on other sites
the sub menu is so far out to the right, how do i get that to be closer?

I do not see the submenus at all (you do not appear to be outputting the DM footer). But in general, alignment problems can be traced to the fact that you are not outputting the DM footer *JUST BEFORE* the closing </BODY> tag in your page.


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

Share this post


Link to post
Share on other sites

Hi, I was wondering if anyone could help me out. I can get the vertical fly out menu to work fine however, the horizontal drop down and tree/plain menu styles just dont work at all. I tried it in a new install and seemed to get the same results.

 

I would like to have a tree menu and fly out menu in the header just like

 

http://panacine.com/index.php

 

Thanks

Share this post


Link to post
Share on other sites
That's the idea... though you shouldn't have a filename in there (or maybe just a pound sign)... and use conditional checks to output this as link or that as not. There will be an a href in the output for the non-link - just make it null...

 

thanks nate

much appreciated!

Share this post


Link to post
Share on other sites
I don't have that problem with IE6 on my site - at least I don't think I do - . Could be a function of a relatively slow connection (I'm using cable modem). I believe that IE6 sometimes stumbles over PHP/Java calls, and that you can solve it by embedding the full code for the menu wherever it's supposed to appear rather than relying on a PHP require or include or whatever you're using.

 

Maybe someone with more expertise can answer more fully. In the meantime, why don't you check my site at ckmac.com, and see if you have the same problem. If you do, I'd be interested to know. If you don't, then you might try the solution I suggest.

 

Well, so far I've had no luck in turning the categories infobox into a div - and I tried to paste the code into the page but I end up getting errors and it doesn't work. Would it be possible to see the code you used in your page to make it work?


~Tracy
 

Share this post


Link to post
Share on other sites

i had a little problem where i like the plain menu for layout, but wanted the mouseover of the vertical flyout, i've got the mouseovers working fine but the subcategories aren't easy to spot due to them being the same size/colour/background as the main categories

 

has anyone managed to achieve this? i guess if a submenu file could be included then this could work as the style could be set in the submenu file, i'm not sure how to include the submenu file into the plain menu though :'( any tips/pointers?

 

dynamenu.gif

Share this post


Link to post
Share on other sites

Hi Nate,

 

I like this contrib alot, but I have a small issue.

 

Recently I set up SSL for my site. When customer goes to my site, the vertical flyout menu works great. But as soon as they go to a secure page the flyout menu stops working and reverts back to the standard OsC tree menu. Any ideas on how to fix this? Thank you for your time.

Share this post


Link to post
Share on other sites

Nate,

 

Actually it isnt just going from a non secure to a secure page, it happens as soon as they leave the homepage. For example: a customer visits the site, they click on a link to one of my items, it goes to the product info page, but the menu reverts to the standard OsC tree menu.

Share this post


Link to post
Share on other sites

Ok I think I have this problem worked out. Now I just need to figure out how to get rid of the old Category info box. Any ideas? You can see what I am talking about at www.wildeals.com

Share this post


Link to post
Share on other sites

Just wanted to post a public Thank You! to Hawgwired for posting the script he had for adding products to the Dynamenu :D

 

I also wanted to post the code after my tweaks for those who may also be using STSv4+ along with Master Products and would like to have their Dynamenu show both the Categories and the Products ;)

 

So - in your includes/functions/general.php file add this just above the closing ?> tag:

//for products in Dynamenu
function tep_products_in_category($category_id, $language = '', $include_inactive = false) {

global $languages_id;

if (empty($language)) $language = $languages_id;

if ($include_inactive) {
$products_query = tep_db_query("select p.products_id, p.products_master_status, pd.products_name as product, pd.products_id as product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = p2c.products_id and p2c.categories_id = '" . $category_id . "' AND pd.language_id = '" . (int)$language . "' and p.products_id = pd.products_id AND p.products_master_status='1' order by pd.products_name");
} else {
$products_query = tep_db_query("select p.products_id, p.products_master_status, pd.products_name as product, pd.products_id as product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = p2c.products_id and p2c.categories_id = '" . $category_id . "' AND pd.language_id = '" . (int)$language . "' and p.products_id = pd.products_id AND p.products_master_status='1' order by pd.products_name");
}

return $products_query;
}

 

Then - in includes/boxes/dm_categories.php find this bit of code:

// Add "more" submenu if dividing subcategories
			if ($this_subcat_count > $divide_subcats && $divide_subcats) {
		$output .= str_repeat(".", $level+$lvl_adjust).'|'.$divide_subcats_text.'||'.$this_title.'|'.$menu_icon_file.'|'.$this_selected.'|'.$this_expanded."\n";							 
				$this_subcat_count = 1;
					$lvl_adjust ++;
			}

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

 

Directly under it place this code:

// mikeys product listing
$products_in_category_query = tep_products_in_category($key);

while ($products_in_category = tep_db_fetch_array($products_in_category_query)) {

$product_id_h = 'products_id='.$products_in_category ['product_id'];
$product_name_h = $products_in_category ['product'];

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

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

$output .= str_repeat(".", $level+2).'|'.$product_name_h.'|'.tep_href_link(FILENAME_PRODUCT_INFO, $product_id_h).'|'.$that_title.'|'.$menu_icon_file.'|'.$that_selected.'|'.$that_expanded."\n";
} //EOF mikeys product listing

 

There ya have it!! Products as well as Categories in your Dynamenu! :D


~Tracy
 

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  

×