Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Dynamenu" for osCommerce


Recommended Posts

New Add-On for DynaMenu! :thumbsup:

 

I needed the ability for my menu to show both the categories, and the products within those categories. I saw others needed this too so figured I would upload it as an add-on contrib. if I got it figured out.

 

I was using Mikey's code for getting the products into the menu - which does work. But on my site it was generating over 60 queries per page to get the products. With the help of others on the forums I was able to change Mikey's function into an object, so now it only generates one query per page to pull all the products.

 

As I stated on the contribution page, I make no promises that it will work on everyone's store, or that I will know how to make it work on your store if it doesn't want to. I'm not an experienced programmer - just a beginner. But I am willing to help if I'm able :blush:

 

If anyone gives it a try, please post and let us know if it works for you!

~Tracy
 

Link to comment
Share on other sites

Hey, nice contribution you got here. I just got some questions about this menu.

 

First of all I should say that Im using the "Vertical Fly-Out Menu Style" menu and I added a picture at the bottom displaying what my issues are. Anyways, heres the questions:

 

1) is there a way I can place the text in the middle of each bar? at the moment its in the left upper corner, if I use padding the whole bar will move down.

 

2) I have a home button over the text and I defined it like this:

echo $before_nobox_html;

// Home button - start //
	echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('home.gif', IMAGE_BUTTON_CONTINUE) . '</a>';	
// Home button - end //

	echo $categories_menu;
.....

And it works fine in Mozilla. However, in IE the button wont show right over the menu and I get a space between the home button and the menu.

 

3) the sub catalog starts a little to much to the left, where can I change this?

 

4) How does this icon thing work? can I define an icon for each category?

 

 

Heres the picture:

catagoryqe2.gif

Edited by Dennis_gull
Link to comment
Share on other sites

Hey, nice contribution you got here. I just got some questions about this menu.

 

First of all I should say that Im using the "Vertical Fly-Out Menu Style" menu and I added a picture at the bottom displaying what my issues are. Anyways, heres the questions:

 

1) is there a way I can place the text in the middle of each bar? at the moment its in the left upper corner, if I use padding the whole bar will move down.

 

2) I have a home button over the text and I defined it like this:

echo $before_nobox_html;

// Home button - start //
	echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('home.gif', IMAGE_BUTTON_CONTINUE) . '</a>';	
// Home button - end //

	echo $categories_menu;
.....

And it works fine in Mozilla. However, in IE the button wont show right over the menu and I get a space between the home button and the menu.

 

3) the sub catalog starts a little to much to the left, where can I change this?

 

4) How does this icon thing work? can I define an icon for each category?

Heres the picture:

catagoryqe2.gif

 

It's all controlled from the stylesheet

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

Link to comment
Share on other sites

Not the space between the home button and the menu and that answer didnt really solve any of the questions I had. I've already tried to use padding but apparently that doesnt work.

 

The stylesheet should work for positioning the submenu (padding does inside the box I believe, and margin does outside - so maybe try adding a margin to the .vertitem tag in the stylesheet).

 

As for the Home link having a space, that is most likely because it is not inside of the menu, but rather it's on your page above where the menu is called. If you View Source on your page you should have a better idea of exactly how the menu is constructed. Then, look at the template file (includes/functions/dynamenu/templates) or at the includes/boxes/dm_categories.php file and see if you can hardcode the Home link into the menu so that it has the right structure.

 

Also - if you do a google search for site:www.oscommerce.com/forums adding links to dynamenu

or site:www.oscommerce.com/forums adding links to catalog

 

You might get some other ideas on how to add that Home link so it is inside the structure of the menu and doesn't have a space :thumbsup:

~Tracy
 

Link to comment
Share on other sites

Ok here's a quick question:

 

I'm new to osc (and truthfully PHP) and I have the dynamenu installed, which works perfectly except that I can't seem to fix one final little bug.

 

I've tweaked the stylesheet to the right colors, but I can't seem to set a new text color for ".dmselected". I'd like the text on the override style for selected categories/subcategories to be a different color, but it just inherits the color from ".verbar". I've tried adding a line to the ".dmselected" but that's about as far as I can go without knowing what to look for.

 

Anyone know how I can bridge this?

 

Much thanks!

Link to comment
Share on other sites

Installed Dynamenu in a horizontal dropdown format and it works great. However, a feature that was working before I added the Dynamenu feature stopped working. If I remove the Dynamenu the feature does work. The feature in question is a javascript that enable us to have a slideshow on our welecome page. the script is as follows:

 

 

<script LANGUAGE="JavaScript">

// =======================================

// set the following variables

// =======================================

// Set slideShowSpeed (milliseconds)

var slideShowSpeed = 5000

// Duration of crossfade (seconds)

var crossFadeDuration = 3

// Specify the image files

var Pic = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below

Pic[0] = 'images/IMAGE_01_web.jpg'

Pic[1] = 'images/IMAGE_02_web.jpg'

Pic[2] = 'images/IMAGE_03_web.jpg'

Pic[3] = 'images/IMAGE_04_web.jpg'

Pic[4] = 'images/IMAGE_05_web.jpg'

Pic[5] = 'images/IMAGE_06_web.jpg'

Pic[6] = 'images/IMAGE_07_web.jpg'

Pic[7] = 'images/IMAGE_08_web.jpg'

Pic[8] = 'images/IMAGE_09_web.jpg'

Pic[9] = 'images/IMAGE_10_web.jpg'

Pic[10] = 'images/IMAGE_11_web.jpg'

Pic[11] = 'images/IMAGE_12_web.jpg'

Pic[12] = 'images/IMAGE_13_web.jpg'

Pic[13] = 'images/IMAGE_14_web.jpg'

Pic[14] = 'images/IMAGE_15_web.jpg'

Pic[15] = 'images/IMAGE_16_web.jpg'

Pic[16] = 'images/IMAGE_17_web.jpg'

Pic[17] = 'images/IMAGE_18_web.jpg'

Pic[18] = 'images/IMAGE_19_web.jpg'

Pic[19] = 'images/IMAGE_20_web.jpg'

// =======================================

// do not edit anything below this line

// =======================================

var t

var j = 0

var p = Pic.length

var preLoad = new Array()

for (i = 0; i < p; i++){

preLoad = new Image()

preLoad.src = Pic

}

function runSlideShow(){

if (document.all){

document.images.SlideShow.style.filter="blendTrans(duration=2)"

document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"

document.images.SlideShow.filters.blendTrans.Apply()

}

document.images.SlideShow.src = preLoad[j].src

if (document.all){

document.images.SlideShow.filters.blendTrans.Play()

}

j = j + 1

if (j > (p-1)) j=0

t = setTimeout('runSlideShow()', slideShowSpeed)

}

</script>

 

To get it to execute we have:

 

<body onLoad="runSlideShow()">

 

<div align="center"><img src="images/IMAGE_02_web.jpg" name='SlideShow' width=400 height=300></div>

 

But there is some conflict. Can anyone help me?

Link to comment
Share on other sites

Installed Dynamenu in a horizontal dropdown format and it works great. However, a feature that was working before I added the Dynamenu feature stopped working... But there is some conflict. Can anyone help me?

This is a common Javascript situation known as an "event-handler" conflict... More than one JS is vying for the attention of the onLoad event. The solution is to combine the onload functions into one function. layermenu.js has a LoadHandler function that is called onload... perhaps you can include your Slideshow function in there or vice-versa

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

Link to comment
Share on other sites

This is a common Javascript situation known as an "event-handler" conflict... More than one JS is vying for the attention of the onLoad event. The solution is to combine the onload functions into one function. layermenu.js has a LoadHandler function that is called onload... perhaps you can include your Slideshow function in there or vice-versa

 

Thanks for responding. How would I go about doing what you suggest. Do I change the body statement to:

 

<body onLoad="runSlideShow(); loadHandler">

 

or do I change the LoadHandler function to:

 

function loadHandler()

{

if (Konqueror22 || Opera56) {

origWidth = window.innerWidth;

origHeight = window.innerHeight;

yaresizeHandler();

}

// =======================================

// set the following variables

// =======================================

// Set slideShowSpeed (milliseconds)

var slideShowSpeed = 5000

// Duration of crossfade (seconds)

var crossFadeDuration = 3

// Specify the image files

var Pic = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below

Pic[0] = 'images/IMAGE_01_web.jpg'

Pic[1] = 'images/IMAGE_02_web.jpg'

Pic[2] = 'images/IMAGE_03_web.jpg'

Pic[3] = 'images/IMAGE_04_web.jpg'

Pic[4] = 'images/IMAGE_05_web.jpg'

Pic[5] = 'images/IMAGE_06_web.jpg'

Pic[6] = 'images/IMAGE_07_web.jpg'

Pic[7] = 'images/IMAGE_08_web.jpg'

Pic[8] = 'images/IMAGE_09_web.jpg'

Pic[9] = 'images/IMAGE_10_web.jpg'

Pic[10] = 'images/IMAGE_11_web.jpg'

Pic[11] = 'images/IMAGE_12_web.jpg'

Pic[12] = 'images/IMAGE_13_web.jpg'

Pic[13] = 'images/IMAGE_14_web.jpg'

Pic[14] = 'images/IMAGE_15_web.jpg'

Pic[15] = 'images/IMAGE_16_web.jpg'

Pic[16] = 'images/IMAGE_17_web.jpg'

Pic[17] = 'images/IMAGE_18_web.jpg'

Pic[18] = 'images/IMAGE_19_web.jpg'

Pic[19] = 'images/IMAGE_20_web.jpg'

// =======================================

// do not edit anything below this line

// =======================================

var t

var j = 0

var p = Pic.length

var preLoad = new Array()

for (i = 0; i < p; i++){

preLoad = new Image()

preLoad.src = Pic

}

function runSlideShow(){

if (document.all){

document.images.SlideShow.style.filter="blendTrans(duration=2)"

document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"

document.images.SlideShow.filters.blendTrans.Apply()

}

document.images.SlideShow.src = preLoad[j].src

if (document.all){

document.images.SlideShow.filters.blendTrans.Play()

}

j = j + 1

if (j > (p-1)) j=0

t = setTimeout('runSlideShow()', slideShowSpeed)

}

 

}

 

and body statement to:

 

<Body>

 

The script doesn't look right to me.

Link to comment
Share on other sites

Once again, ftw:

 

I'd like the text on the override style for selected categories/subcategories to be a different color, but it just inherits the color from ".verbar". I've tried adding a line to the ".dmselected" but that's about as far as I can go without knowing what to look for.

 

Anyone know how I can bridge this?

 

Much thanks!

Link to comment
Share on other sites

This is not going to help much, just to say that I have the same problem. I am using the horizontal style, but I cannot find how to change the text colour. What puzzles me is that it is clearly matching the dmselected selector because the background colour and text style are all what I would expect, but why is the text colour unaffected?

 

Help!

Link to comment
Share on other sites

Nate or all,

 

I am another "newbie" into this whole Oscommerce thing and also not very at ease with all the coding. Being said, I can find my way around when possible but it looks like this time, I have no idea what is going on.

 

Being said, I have been messing up with my own oscommerce for few weeks now and decided to experiment the dynamenu contribution. Everything got installed smoothly, everything looked great...until I opened my product description.

 

The production description is using a tab menu. After installing the tabs are not seen as individual pages now but rather as one page, divided by lines. Even more, the tab titles are still there and if I click on any of them, they redirect me to the main page of the whole catalog.

 

So the question is, how does dm_categories.php can affect product_info.php???

Sorry if it sounds obvious for you but I am lost on such things....

 

p.s. I did try to find such problems throughout the 16 pages of this thread but no luck.....unless I am also blind...

Link to comment
Share on other sites

So the question is, how does dm_categories.php can affect product_info.php???

It doesn't - product_info.php does not have tabs on it. You must have a custom Javascript installed on that page and there may be an event-handler conflict (described just a few posts above). If the tab thing uses the onLoad event to initialize, that may be the source of the conflict.

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

Link to comment
Share on other sites

So if I understand right using an "onload" function in the product_info.php could affect something else outside that file?

I am just trying to understand how I can get an event handling issue when both files are completely separate.

 

Let me try this;

 

The column_left.php got modified to suit the dm_categories.php. As I load the product_info.php, I also reload the column_left.php, which then call for the dm_categories.php , which is how both files would be ultimately related to the same event.

 

Am I assuming things right?

 

Sorry for the dumb logics

Link to comment
Share on other sites

Once again, ftw:

 

I'd like the text on the override style for selected categories/subcategories to be a different color, but it just inherits the color from ".verbar". I've tried adding a line to the ".dmselected" but that's about as far as I can go without knowing what to look for.

 

Anyone know how I can bridge this?

 

Much thanks!

 

You should have .vertsubitem as a class in your stylesheet (if your using the vertical menu) - this class governs the submenu's - you'll find .vertsubitem a, .vertsubitem a:link - etc.... You can change the font through the stylesheet under these classes and you should be able to achieve the result you're looking for :thumbsup:

~Tracy
 

Link to comment
Share on other sites

First of all..LOVE the contribution! Just trying to make a few appearance changes for the tree structure option and have a quick question.

 

I'm not sure if it is a layers width issue or something else, but I'm trying to change the background of the expanded node and/or the selected leaf, but I can't get the background color to cover the entire expanse of the table size.

 

My table size is bigger than any one entry so I'm seeing the table background color on the right hand side of the tree entry. Does that make any sense? I'd put a capture of the screen in here, but I seem to be unable to paste that in..

 

Any help would be greatly appreciated!

 

Thanks!

Link to comment
Share on other sites

First of all..LOVE the contribution! Just trying to make a few appearance changes for the tree structure option and have a quick question.

 

I'm not sure if it is a layers width issue or something else, but I'm trying to change the background of the expanded node and/or the selected leaf, but I can't get the background color to cover the entire expanse of the table size.

 

My table size is bigger than any one entry so I'm seeing the table background color on the right hand side of the tree entry. Does that make any sense? I'd put a capture of the screen in here, but I seem to be unable to paste that in..

 

Any help would be greatly appreciated!

 

Thanks!

Link to comment
Share on other sites

I am having trouble getting the dynamenu to flyout. Check it out Here.

 

The only contribution I have implemented thus far is STS 4.4.

 

I inserted

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

just before the </body> tag.

 

Any ideas?

 

Thanks,

Dano

Link to comment
Share on other sites

Did you upload them to your server in ASCII mode or Binary mode? Binary can corrupt them while they are being uploaded, so they may look like they are there, but the file is corrupt so when the script calls it the script doesn't think it's there.

 

How does one change the mode? I just use the upload function in the osCommerce admin interface. Is there something that I toggle to put it into the right mode?

Link to comment
Share on other sites

Hello everyone...

 

Is the "May 2006 Dynamenu" the latest stable version? (meaning has there been any known bugs in this version that a fix has already been made available in this forum or otherwise?)

I want to extensively test this contribution with the latest version of STS (4.4) but would rather start out of the gate with a stable version. :blush: :-

 

Thanks,

Bill Kellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I am having trouble getting the dynamenu to flyout. Check it out Here.

 

The only contribution I have implemented thus far is STS 4.4.

 

I inserted

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

just before the </body> tag.

 

Any ideas?

 

Thanks,

Dano

Dan, in my tutorial, I mentioned that you MAY have to add the above code to your includes/application_bottom.php file. Well, as it turns out, YOU HAVE to add the above code in order to make the flyouts work in STS.

Here is the "above code" that the tutorial was referring to:

 

	// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];
?>

Add this code to your includes/application_top.php as well as everything else mentioned in the tutorial and you will get your flyout menus to work.

I will update my tutorial on the STS4 Power Pack site to reflect these additions.

By the way...just so everyone knows:

 

I installed Dynamenu (May 2006) according to the exact instructions given in the contribution. (Even the footer.php echo code just in case you decide to keep using the menu with STS turned off. This will not casue a problem with your site.)

I then created my STS tag in my "sts_column_left.php" page directly after my manufacturerbox define (you can modify this for your header page, etc):

 

 $sts->restart_capture ('manufacturerbox', 'box');

require(DIR_WS_BOXES . 'dm_categories.php');
 $sts->restart_capture('dmbox', 'box'); // Get Dynamenu Category box

Of course I added ALL of the Dynamenu styles to my stylesheet.css file even though I will only be using one style at a time (it doesn't hurt to have them all defined).

 

Oh, and I kept with the defaults, meaning I did not change anything in the "dm_categories.php" file just to make sure everything worked.

 

You can see an example of Dynamenu working with STS here:

http://soundsgoodpro.com/dynamenu/

 

Let me know if you have any issues.

Bill Kellum

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

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