Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 58
  1. #11
    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

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

    Default Re: Bringing page with JQuery intoZen Cart

    OK, the image problem is now sorted as far as I can tell.

    Just getting the JScript to fire up now.

  3. #13
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Bringing page with JQuery intoZen Cart

    Quote Originally Posted by blahblah4949 View Post
    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 ?
    No, I think I'd put it in the HTML, after closing slider </div>
    .

    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.

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

    Default Re: Bringing page with JQuery intoZen Cart

    Well tried it in a few places in the html but no joy yet. I checked the 3 images are in there so it's not that.

    I'm thinking maybe a wrong filename is causing this? Can't see anything so far though

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

    Default Re: Bringing page with JQuery intoZen Cart

    If you look at the source code, it appears the CSS file for the slider is not in the header. I have the file sitting in my CSS folder of my custom template, so how can I link to it in the header? At the moment it is just named ' nivo-slider.css ' .

    Thanks for your help with this

  6. #16
    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
    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
    Ah, so I just place the nivo-slider.css in with the stylesheet.css? I don't need to keep the two separate?

  7. #17
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Bringing page with JQuery intoZen Cart

    Or you could rename the file to start with "style" so that Zen Cart will pick it up and use it automatically.
    ie: "style_nivo-slider.css"
    .

    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.

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

    Default Re: Bringing page with JQuery intoZen Cart

    Quote Originally Posted by DrByte View Post
    Or you could rename the file to start with "style" so that Zen Cart will pick it up and use it automatically.
    ie: "style_nivo-slider.css"
    Great tip, thanks.

    Well can't be far from cracking this now. From the source code does it appear like everything should work?

    Am triple checking everything but maybe it's too obvious.

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

    Default Re: Bringing page with JQuery intoZen Cart

    OK, last stab before I hit the sack (nearly midnight in UK).

    Really appreciate the help so far

  10. #20
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Bringing page with JQuery intoZen Cart

    At the top of your jscript_jquery.nivo.slider.js file is a section of code that contains this:
    Code:
    $(window).load(function() {
        $('#slider').jscript_nivo.Slider();
    });
    and that's throwing this error:
    TypeError: Result of expression '$('#slider').jscript_nivo' [undefined] is not an object
    I think you added that whole section of the code to the file as a guess, but that was a mistake, and is now causing things to break.
    .

    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.

 

 
Page 2 of 6 FirstFirst 1234 ... 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