Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default Adding .JS files and code into a side box

    Hi ! Long time :-)

    I am wanting to add an HTML5 music player into an editable side box

    I can do the first bit (editable side box) - e.g., adding twitter etc

    What I am struggling with is working out where to put the .js files.
    I can see that my .js files need to be appended with "jscript_FILENAME.js"

    but what about the header code? Does the
    I'm using amazingaudioplayer.com which generates also a .css file

    my outputted files look like this in a dir

    http://imgur.com/2EUScgt

    is it possible ? I have viewed quite a through threads, but not sure if i am asking too much !

    thanks for any help/advice

  2. #2
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: Adding .JS files and code into a side box

    Quote Originally Posted by davidandrews View Post
    Hi ! Long time :-)

    I am wanting to add an HTML5 music player into an editable side box

    I can do the first bit (editable side box) - e.g., adding twitter etc

    What I am struggling with is working out where to put the .js files.
    I can see that my .js files need to be appended with "jscript_FILENAME.js"

    but what about the header code? Does the
    I'm using amazingaudioplayer.com which generates also a .css file

    my outputted files look like this in a dir

    http://imgur.com/2EUScgt

    is it possible ? I have viewed quite a through threads, but not sure if i am asking too much !

    thanks for any help/advice
    If you check the wiki section of this site, there is a great article that explains how to implement javascript in zen cart.

    Thanks,

    Anne

  3. #3
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: Adding .JS files and code into a side box

    Quote Originally Posted by picaflor-azul View Post
    If you check the wiki section of this site, there is a great article that explains how to implement javascript in zen cart.

    Thanks,

    Anne
    Thanks Anne

    I tried that link earlier but could't fathom three things:
    1) where to put the header (of if not needed at all if appending .js files with jscript_ )
    2) where to put the body section
    3) which DIR to put the files (audio, css)

    as shown here:

    http://amazingaudioplayer.com/how-to...ac&version=2.8

  4. #4
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: Adding .JS files and code into a side box

    Quote Originally Posted by davidandrews View Post
    Thanks Anne

    I tried that link earlier but could't fathom three things:
    1) where to put the header (of if not needed at all if appending .js files with jscript_ )
    2) where to put the body section
    3) which DIR to put the files (audio, css)

    as shown here:

    http://amazingaudioplayer.com/how-to...ac&version=2.8
    The jscript files can be called from any where in a page, so you can call them right in your sidebox code. I assume that you are using either the blank or editable sidebox module.

    Thanks,

    Anne

  5. #5
    Join Date
    Apr 2006
    Posts
    108
    Plugin Contributions
    0

    Default Re: Adding .JS files and code into a side box

    Quote Originally Posted by picaflor-azul View Post
    The jscript files can be called from any where in a page, so you can call them right in your sidebox code. I assume that you are using either the blank or editable sidebox module.

    Thanks,

    Anne
    Hi Anne
    Many Thanks for your help
    yes thats correct, i am using those modules.

    Do i need to edit the tpl or php files?

    Thanks

    David

  6. #6
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: Adding .JS files and code into a side box

    Quote Originally Posted by davidandrews View Post
    Hi Anne
    Many Thanks for your help
    yes thats correct, i am using those modules.

    Do i need to edit the tpl or php files?

    Thanks

    David
    I would put the calls for the js in whichever file you are adding your sidebox text in. I believe that the editable sidebox module uses a define page for this.

    Thanks,

    Anne

  7. #7
    Join Date
    Dec 2011
    Location
    Emmen, The Netherlands
    Posts
    85
    Plugin Contributions
    0

    Default Re: Adding .JS files and code into a side box

    you can load your script/js in the html_header file

    located here:
    httpdocs/shop/includes/templates/YOUR_TEMPLATE/common/html_header.php

    add your code between script tags
    before the ending of the code

    like this

    <script>insert your code here</script>
    </head>
    <?php // NOTE: Blank line following is intended: ?>

    the stuff which u need in the body would be the sidebox content.

    In order to find out where to place your files, just edit the pages then using the page source or inspect element you can find where zencart is trying to find the files!

    Im not exactly sure if this is how u are supposed to do it but for me this works...

    if you cant get it working you can also take a look at this page which has another method using the override system

    http://www.zen-cart.com/content.php?228
    Last edited by wrickspam; 4 Sep 2014 at 09:12 AM.

 

 

Similar Threads

  1. v139h How do I insert a "snippet" code into a side box - SSL Site Seal
    By shags38 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Jun 2012, 06:34 AM
  2. Entering HTM Code into PHP Files - Adding Live Search to search_header.php
    By Jump Network in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2007, 02:47 PM
  3. Adding banner exchange code into blank side boxes
    By kapearl in forum Addon Sideboxes
    Replies: 1
    Last Post: 18 Jul 2007, 12:48 AM
  4. Adding a Space Between footer and Side box
    By Darkwander in forum General Questions
    Replies: 3
    Last Post: 13 Sep 2006, 08:48 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR