X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Trying to get DHTML menu to show. (https://forum.x-cart.com/showthread.php?t=12713)

KCAutosound 03-09-2005 09:40 PM

Trying to get DHTML menu to show.
 
anyone know of a way to put a frameset into a tpl file.

I have a DHTML menu that I have lots of work into but now can't manage to put it into the site.

The code in the html file for the menu is
Code:

<html>
<head>
        <title>Your Title</title>
</head>
<frameset cols="150,*" framespacing='0' frameborder='0' border='0'>
        <frame frameborder='0' framespacing='0' src="VerticalFramesNavigation.htm" noresize scrolling='no' name="navig"></frame>
        <frame frameborder='0' framespacing='0' src="VerticalFramesMainPage.htm" name="space"></frame>
</frameset>
</html>


You can view the menu HERE

You can download the whole menu script and all if you like. Maybe someone can decifer what they have done here. It's a great menu with lots of effects. Just trying to get it to show in the site. It can even bring up pictures and all with no limit of sub menus.

Here are all the files Download Here

balinor 03-10-2005 03:28 AM

NO FRAMES!!!!! I HIGHLY recommend you don't use frames....very bad idea. If you are looking for a good DHTML menu, try Dynamic Drive (www.dynamicdrive.com). They have some great DHTML menus, that aren't in outdated frames :)

KCAutosound 03-10-2005 04:21 AM

well I think the menu is just displayed in frames for the example. I assume you can display it in other ways but I'm not too sure how to go about it.

balinor 03-10-2005 04:24 AM

Here's one that I use on a lot of sites....very flexible and even comes with a nice little interface to configure the menu so you don't have to edit any code:

http://www.navsurf.com/dhtml/acemenu/default.asp

KCAutosound 03-10-2005 04:52 AM

hey great. My car audio site has lots of categories, products, and manufacturers. I really need the dynamic menu. I also thought about just creating a menu that just drops open when you click the links and then stays there. Simliar to www.cardomain.com

Today Carrie from BCSEngeneering.com is supposed to call me and we will discuss a site template and many many mods for the site. Maybe even she could come up with the type of menu I'm looking for and need.

balinor 03-10-2005 04:56 AM

Just be careful how deep you make the menu. In my experience, if you have a lot of categories, going more than 2 sub-categories deep REALLY slows down the cart. But Carrie really knows what she is doing and I'm sure she'll take good care of you :)

KCAutosound 03-10-2005 05:12 AM

I learned that to. I have used the dhtml menus on a few of my php-nuke sites. I basically have just one subcategory on the menu. Say you go to Amplifiers. Then it goes to amp types such as mono channel, multi-channel, 2-channel. Then that page it takes you to allows you to choose between manufacturers.

I'm going to make it just a hardcoded menu. Not sure how to make it draw from a database which I assume is what slows it down anyways such as the FancyCategories Menu.

By the way... thanks from your quick replies. Seems as soon as I submit something you're right back with an answer. :)

KCAutosound 03-10-2005 11:55 AM

what's the trick to getting this menu into the site?

balinor 03-10-2005 12:20 PM

Just follow the install directions for whatever script you are installing. Be sure to put any scripts in {literal} tags so that they don't get botched up. Example:

{literal}script here{/literal}

KCAutosound 03-10-2005 12:56 PM

When I generated the menu it made a .htm file that dislplayed the menu. Basically with some javascript inside of it. I tried posting this code within a menu.tpl file I created within my skin1/customer folder

Code:

{* $Id: dhtml.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
{literal}

<script language="JavaScript1.2" type="text/javascript">var ace_path = '';
</script>
<script language="JavaScript1.2" type="text/javascript" src="customer/menu/acemenu_loader.js">
</script>

<body>
<script language="JavaScript1.2" type="text/javascript" src="customer/menu/kcamenu.js">
</script>
<script language="JavaScript1.2" type="text/javascript">ACEDisplayMenu();
</script>
<script language="JavaScript1.2" type="text/javascript">ACECreateMenu();onload=ACELoadMenu;
</script>

{/literal}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=dhtml menu_content=$smarty.capture.menu }


But no such luck. doesn't display the menu at all.

balinor 03-10-2005 12:59 PM

Read the instructions for that menu very carefully. You need to put some of that script in the <head> tag of home.tpl, some of it where you actually want the menu to display, and some more still before the closing <body> tag in home.tpl. You also need to upload the .js files to the x-cart directory. I usually put them in the root, easier to call that way.

KCAutosound 03-10-2005 02:30 PM

well I tried to place this code between the <head> tags
Code:

{literal}
<script language="JavaScript1.2" type="text/javascript">var ace_path = '';
</script>
<script language="JavaScript1.2" type="text/javascript" src="acemenu_loader.js">
</script>
{literal}


then I replaced { include file="customer/categories.tpl" } with

Code:

{literal}
<script language="JavaScript1.2" type="text/javascript" src="kcamenu.js"></script>
{/literal}


then just before the </body> tag I placed

Code:

{literal}
<script language="JavaScript1.2" type="text/javascript">ACEDisplayMenu();
</script>
<script language="JavaScript1.2" type="text/javascript">ACECreateMenu();onload=ACELoadMenu;
</script>
{/literal}


but still nothing. Like brain surgery to me man..lol This is about the only thing keeping my site from going live.

balinor 03-10-2005 02:42 PM

Ok, you are close. You have the head right, but you have one extra line in the footer. This should go in categories.tpl:

Code:

{literal}
<script language="JavaScript1.2" type="text/javascript" src="kcamenu.js"></script>
<script language="JavaScript1.2" type="text/javascript">ACEDisplayMenu();
</script>{/literal}


the one before the body should only be this:

Code:

{literal}
<script language="JavaScript1.2" type="text/javascript">ACECreateMenu();onload=ACELoadMenu;
</script>
{/literal}


You might also have to change the var ace_path='' depending on where you put the javascript files. Same thing for where the acemenu_loader.js is.

If you get totally and completely stuck after trying these fixes, PM me and I can help you out...I've done a ton of these things. But try it out for yourself first.....

KCAutosound 03-10-2005 03:11 PM

Oh the suspense... almost there!!!

I left the code above the tag alone

Code:

<LINK rel="stylesheet" href="{$SkinDir}/tabs.css">

{literal}
<script language="JavaScript1.2" type="text/javascript">var ace_path = '';
</script>
<script language="JavaScript1.2" type="text/javascript" src="acemenu_loader.js">
</script>
{/literal}

</HEAD>
<BODY leftmargin="0" topmargin="0" rightmargin="0" bottomargin="0" marginwidth="0" marginheight="0">


Just before the </body> tag.

Code:

</TABLE>
{ include file="rectangle_bottom.tpl" }
{literal}
<script language="JavaScript1.2" type="text/javascript">ACECreateMenu();onload=ACELoadMenu;
</script>
{/literal}
</BODY>
</HTML>


I did move that code to the categories.tpl file

Code:

{* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
{literal}
<script language="JavaScript1.2" type="text/javascript" src="kcamenu.js"></script>
<script language="JavaScript1.2" type="text/javascript">ACEDisplayMenu();
</script>{/literal}
{/capture}
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }


I have went as far as placing the kcamenu.js and acemenu_loader.js files in every directory from root on..lol but still no menu showing.

Not quite sure on what setting I should have on that ace_path='' line though.

balinor 03-10-2005 03:52 PM

Ok, try this...put the required files in skin1/. Now change the head tags to read like this:

Code:

{literal}<script language="JavaScript1.2">var ace_path = 'skin1/';</script>
<script language="JavaScript1.2" src="skin1/acemenu_loader.js"></script>
{/literal}


KCAutosound 03-10-2005 04:09 PM

doh!!!! No such luck.

balinor 03-10-2005 04:51 PM

PM me and I can take a look for you...

garry 08-11-2005 01:23 PM

I always put all the menu files in the root and the file that calls the menu in skin1, and then call the required file e.g.

{include file="menu.htm"}

Using this method there is no ned for the literal tags and always shows (well so far anyway)


All times are GMT -8. The time now is 07:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.