Results 1 to 10 of 38

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Location
    Columbus, Ohio
    Posts
    19
    Plugin Contributions
    0

    Default Inserting Code into tpl_header.php

    Hey,

    I have a quick question that I am sure is easy for someone to answer. I have zencart running on a site:

    ZenCart Store

    ...and the template I started with does not have the html_header.php file in it. So I need to insert some javascript into the tpl_header.php so I can have a popup menu at the top.
    (I did modify the template heavily in graphics but no changes outside of colors, graphics, etc.)

    How do I do this? The Javascript code is:
    Code:
    <script language="javascript">var MenuFolderName="";</script><script charset="UTF-8" language="javascript" src="sftmp6arrays.js"></script><script charset="UTF-8" language="javascript" src="sfmenutmp6ie.js"></script>
    I imagine this can't be all that difficult as I added a chat client to the header easily. I just don't know how to get the javascript to work in this file. Thanks!

    Here is all the information about it:

    Zen Cart 1.3.8a
    Database Patch Level: 1.3.8
    Fresh Installation

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

    Default Re: Inserting Code into tpl_header.php

    Should be no need to edit as ZenCart loads all js that is in the js folder
    Place it in a jscript folder in your template - create folder if there isn't one
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2010
    Location
    Columbus, Ohio
    Posts
    19
    Plugin Contributions
    0

    Default Re: Inserting Code into tpl_header.php

    Ok, so what would I call this folder? And I don't have to put anything in the header to call the jscript files to make the menu show up?

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

    Default Re: Inserting Code into tpl_header.php

    Quote Originally Posted by drymetal
    Ok, so what would I call this folder?
    Quoting Myself
    Place it in a jscript folder in your template - create folder if there isn't one
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Dec 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Inserting Code into tpl_header.php

    I'm having a similar issue as the one that drymetal's having. I'm trying to use the shadowbox javascript code to display images, so I need the javascript to load in the <head>. I've tried putting the shadowbox.js file in the js folder, but ZC isn't loading it automatically. Is there something else I need to do? Hope this isn't a hijack, since we're both just trying to load extra javascript into the <head> tag.

  6. #6
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Inserting Code into tpl_header.php

    Read the readme text file that is in the js folder ...
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

 

 

Similar Threads

  1. Inserting a string into PHP
    By bhensarl in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 Nov 2010, 11:46 AM
  2. PHP Question: Inserting code to refer to another .php file
    By datatv in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 17 Sep 2008, 10:24 PM
  3. Insert Image into Tpl_header.php
    By atheis in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Aug 2008, 06:20 PM
  4. putting tpl_categories_css.php into tpl_header?
    By atracksler in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Oct 2006, 08:59 PM

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