Page 1 of 3 123 LastLast
Results 1 to 10 of 58

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Bringing page with JQuery into store

    Hi,

    I was wondering what would be the best way to import a static Xhtml page which has JQuery into Zen Cart. I am hoping I can use EZ pages, but not sure how I bring the JQ in with the Xhtml.

    Page to import with JQ

    Zen Cart testsite

    At the moment they are linked internally (my ZC is in a subfolder), but think it would be better to have it all as one after listening to advice here.

    Are there any tutorials on adding JQuery to EZ pages?

    Thanks

  2. #2
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    OK, so I did some more digging around and found this link from a couple months back:

    http://www.zen-cart.com/forum/showthread.php?t=88724

    I looked in my includes/templates/CUSTOM TEMPLATE/ but there is no JScript folder there. So how about this for a plan of action:

    1 Create a JScript folder in my CUSTOM template folder and put all JScript files inside (adding jscript_ before each file name).

    2 Place the HTML inside an EZ page.

    3 Hmm.. not sure. Will the ez page pick up the JScript files automatically or do I have to do anything else to link them?

    Cheers

  3. #3
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    Oh, forgot the CSS that comes with the JS slider as well. Should I just create a separate CSS file in my CUSTOM template and put the files in there?

    Thanks for any help.

  4. #4
    Join Date
    Oct 2009
    Location
    Stockholm, Sweden
    Posts
    16
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    you need to put them in your html_header file and then your whole site will pick them up including ez pages

  5. #5
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    Quote Originally Posted by ftdc View Post
    you need to put them in your html_header file and then your whole site will pick them up including ez pages
    The CSS yeah? Thanks mate, you mean the one found under

    templates/template_default/common/html_header.php

    So I put CSS in there and do the rest as you said on the other post?


    Thanks..

  6. #6
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    Could someone explain where I put the CSS again please? ftdc could you say whereabouts if you have a sec. I have copied the JS files over and the html is in the EZ page. Just need to sort the CSS.

    Thanks again..

  7. #7
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    Ok, still here lol

    Found this:

    http://www.zen-cart.com/forum/showthread.php?t=51148

    So I added that piece of code to the header, uploaded it along with the two JScript files it needs. Opened a new file for an EZ page, cut/paste my original html file into that.

    You can see it here live: test page.

    So it looks like the html is there, but the CSS is not linked up yet. Is it something to do with naming the chapter on the EZ page edit?

    I want it to eventually look like this : http://www.zentest.net/index.html


  8. #8
    Join Date
    Oct 2009
    Location
    Stockholm, Sweden
    Posts
    16
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    Yes look at.
    To explain it ferther your jquerry statement without The <script> tags go in à file legs call it smide.js for example. Then in your html_header file you link it in inside à <script> tag and The css gods inside include/templates/yourtemplate/css/stylesheat.css

    Hope that make sens, good luck.
    Posted via Mobile Device

  9. #9
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Bringing page with JQuery intoZen Cart

    No, it doesn't make sense.
    And there is no need to touch html_header.php at all.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Jul 2010
    Location
    London, England
    Posts
    58
    Plugin Contributions
    0

    Default Re: Bringing page with JQuery intoZen Cart

    Thank you very much DrByte. Just the info I was after and gives a much better understanding. Funny, as I use view source all the time but never thought of using it in this instance

    I have done as you said and removed the unnecessary stuff from the head/tags. Added the pics 123 to the images folder of my custom template.

    What I don't quite understand is where to place this part that fires up the Js from the head:

    HTML Code:
    <script type="text/javascript">
    $(window).load(function() {
    	$('#slider').nivoSlider();
    });
    </script>
    You say "Stuff it into the jscript folder for the pages you want it to load on, and use the prescribed filenaming convention."

    Do you mean to give it it's own file, and then name it jscript_nivoslider.js ? Or..

    Stuff it in the main slider.js file I have in there?

    Also, only some of my images are being picked up. The background pic is, but the logo is not for example. The images are sitting in my images folder of my custom template. I know I've made a stupid schoolboy error somewhere

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Integrate Amazon Store Into Ezy Page?
    By silentavatar in forum General Questions
    Replies: 8
    Last Post: 24 Mar 2011, 09:58 PM
  2. Error bringing up the admin page
    By ChrisW97 in forum General Questions
    Replies: 2
    Last Post: 22 Apr 2010, 02:34 PM
  3. Bringing Recent Forum / Blog Posts Into My ZC?
    By taogem in forum General Questions
    Replies: 3
    Last Post: 15 Sep 2008, 07:41 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