Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Posts
    35
    Plugin Contributions
    0

    Default How to put regular site javascript menu on store?

    Apologies for this very basic question but I've searched for clear answer to this -
    I want my pulldown menu system at the top of the store page. Every store page.
    I found info here about changing tpl_header.php and can do this (putting it into my own template common folder) but my menu depends on a javascript source file... in other words, it should be somewhere more basic than in this include?

    Forgive my newbie-ishness and thank you...

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: How to put regular site javascript menu on store?

    If you look at the directories in template_default you should see a jscript dir.
    This and others can be replicated in your template dir and the js for your menu placed in this folder
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How to put regular site javascript menu on store?

    Thank you for this - I am struggling w/this and have read the docs...
    do the actual files (firewords menu files like mm_menu.js) have to actually have their filenames prefixed with "jscript_" and "onload_"?

    The menu I'm trying to put in is Fireworks which has 3 parts -
    1. javascript menu functions that belong in the HEAD, (I used to have this there as a php include: <?php include("menufunctions.htm"); ?>

    2. This was also in HEAD:<script language="JavaScript1.2" src="mm_menu.js"></script>
    </script>
    3. And this was after BODY:<script language="JavaScript1.2">mmLoadMenus();</script>

    I have all 3 in jscript but am now wondering if any of these need to be in ONLOAD folder...
    any advice or a model of this is much appreciated...

  4. #4
    Join Date
    Nov 2005
    Location
    Missouri
    Posts
    37
    Plugin Contributions
    0

    Default Re: How to put regular site javascript menu on store?

    I believe by placing the script in the jscript folder and giving it the prefix of jscript_ it will automatically be called in the header, no need to add part #2 in your question

    To make the menu appear just place the body code into your page/sidebox etc. where you want it to show.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: How to put regular site javascript menu on store?

    If this is for a flash type of header - serarch here for "flash header" as this has been covered many times
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jan 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How to put regular site javascript menu on store?

    Got it!
    All who patiently answered me - thank you. When I feel competent enough a zenner I will try to pay back!
    For the Fireworks menu -
    the mm_menu.js gets renamed jscript_mm_menu.js and put in one's customized templates folder/jscript.
    It gets added as tho it were in in its usual SCRIPT tag in the HEAD -

    In tpl_header.php (after saving the original in case) I added these 2:
    1. a php include for the function mmLoadMenus...
    2. script call (<script language="Javascript1.2">mmLoadMenus<>;</script>

    Then - the piece I forgot!!! - the most important piece - is put the actual menu in - which is either in a menu table or div... that displays the whole thing and calls the functions.
    I didn't use on_load folder at all. Am sure there is a more elegant way to do this but - it works. Thanks again. Guess I'd better get that zencart book...

 

 

Similar Threads

  1. How can I put attribute errors into a javascript popup?
    By rkarta in forum General Questions
    Replies: 14
    Last Post: 26 Nov 2010, 12:04 PM
  2. How to put Javascript inside PHP?
    By bhensarl in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Feb 2010, 07:07 AM
  3. Replies: 2
    Last Post: 27 May 2007, 07:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg