Announcement

Collapse
No announcement yet.

quickview works with jquery 1.3.2 but not 1.6.1

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • quickview works with jquery 1.3.2 but not 1.6.1

    So, I've finally found out why quickview doesn't work for me on my homepage.



    arrrrrrrrrrgggggggggggghhhhhhhhhh





    I'm using the nivo slider and the nivo slider requires jquery 1.6.1.



    Quickview requires 1.3.2 and when I initialize 1.61, it breaks.



    I get the following error message in developer tools:



    Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'modal'

    open_productquick_view.js:90

    (anonymous function)http://getmechocolate.3dcartstores.com/:571

    onclick



    I opened the quickview.js file and I see the hardwired references to the jquery 1.3.2.



    quick.view.js



    if (typeof jQuery == 'undefined') {

    document.write("<script type=\"text/javascript\" src=\"assets/templates/common/js/jquery-1.3.2.min.js\"></" + "script>");

    var __noconflict = true;

    }



    Support got back to me within 5 minutes to tell me custom coding is out of their scope of support. Yay support.

    I don't do any development so I'm not familiar with the error messages. Anyone know if I just change the reference from 1.3.2 to 1.6.1?

  • #2
    I just went ahead and changed the hard code in the quickview.js file to the new jquery version and now both nivo slider and quickview works.

    Just so ya know!

    Comment


    • #3
      Thank you for the info.
      I ran into this with a slider that used a newer version of Jquery. Support helped me find the problem. I had to change to a mootools slider, but glad to know an alternative solution exists.
      I thought we cannot edit files in the common folder!

      Comment


      • #4
        Download the .js file, change the line, upload it to your own script directory, and then change the css line to access THAT .js file as opposed to the common directory version.

        Easy peasy.

        On another note, I hate it when support opts for the easy solution without figuring out what the root cause is. I used to work in support and this drove me nuts.

        But I like Shevon though. She(he?) is an awesome support rep.

        Comment


        • #5
          If you could figure out a way to make QuickSearch work with a modern jquery then I will give you an internet high five. :)

          Comment


          • #6
            Yes this has been a problem for me as well.
            I submitted a request for them to update the outdated js libraries for jQuery and Prototype (hope they remove it and only use jQuery).

            I hope they updated it soon.
            - Peace
            www.ifilters.net

            Comment


            • #7
              Originally posted by user001 View Post
              Yes this has been a problem for me as well.
              I submitted a request for them to update the outdated js libraries for jQuery and Prototype (hope they remove it and only use jQuery).

              I hope they updated it soon.
              In theory you should be able to use two different jQuery versions side by side. I found solutions like this:
              javascript - Can I use multiple versions of jQuery on the same page? - Stack Overflow

              But I only know enough javascript to tinker around and wasn't able to get it working with QuickSearch

              Comment


              • #8
                Originally posted by cbsteven View Post
                In theory you should be able to use two different jQuery versions side by side. I found solutions like this:
                javascript - Can I use multiple versions of jQuery on the same page? - Stack Overflow

                But I only know enough javascript to tinker around and wasn't able to get it working with QuickSearch
                I run the older jQuery 1.3 and the new 1.7 as well as the outdated Prototype they make us use.

                To get quicksearch working try wrapping your jquery calls in "noConflict".
                This will also help if your having issues running jQuery on your view cart and checkout page.

                Try reading over my responses in this thread.
                http://forums.3dcart.com/store-desig...sing-them.html

                Thats what I did and everything works for me in every page, hope this helps.
                - Peace
                www.ifilters.net

                Comment


                • #9
                  Thanks. I was able to get it to work with this in my frame:

                  Code:
                  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
                  <script type="text/javascript">
                  	var jq1_3 = $.noConflict();
                  </script>
                  
                  <!--START: quicksearch-->
                  
                  <script type="text/javascript" src="assets/templates/AEBike_Common/jquery.quicksearch.js"></script>
                  
                  <link rel="stylesheet" href="assets/templates/common/quicksearch/quicksearch.css">
                  <script type="text/javascript">
                  	jq1_3(function() {
                  		jq1_3('#searchlight').searchlight('/search_quick.asp');
                  	});
                  </script>
                  <!--END: quicksearch-->
                  
                  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
                  For some reason it would not work if I loaded jquery1.7 before the quicksearch block. I am curious why if you don't know.

                  Then I made a copy of the file in templates/common/quicksearch/jquery.quicksearch.js and put it in my own template folder, and simply replaced all occurences of "$" and "jquery" with "jq1_3"

                  Comment


                  • #10
                    cbsteven, Thank you for posting that! Works great!

                    Comment


                    • #11
                      Originally posted by cbsteven View Post
                      Thanks. I was able to get it to work with this in my frame:

                      Code:
                      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
                      <script type="text/javascript">
                      	var jq1_3 = $.noConflict();
                      </script>
                      
                      <!--START: quicksearch-->
                      
                      <script type="text/javascript" src="assets/templates/AEBike_Common/jquery.quicksearch.js"></script>
                      
                      <link rel="stylesheet" href="assets/templates/common/quicksearch/quicksearch.css">
                      <script type="text/javascript">
                      	jq1_3(function() {
                      		jq1_3('#searchlight').searchlight('/search_quick.asp');
                      	});
                      </script>
                      <!--END: quicksearch-->
                      
                      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
                      For some reason it would not work if I loaded jquery1.7 before the quicksearch block. I am curious why if you don't know.

                      Then I made a copy of the file in templates/common/quicksearch/jquery.quicksearch.js and put it in my own template folder, and simply replaced all occurences of "$" and "jquery" with "jq1_3"
                      I think it has to to with the way the js libraries load, I think it uses the last js linked library file, im not sure.

                      Also, it is worth mentioning that if 3dCart decides to update the jquery.quicksearch.js in the common folder you will have to reflect their update on you jquery.quicksearch.js copy.

                      On a side note: you could replace "jq1_3" with anything you like to make it faster for you to update later, eg. var jq = $.noConflict();

                      for further reading of noConflict() usage go here, jQuery.noConflict() – jQuery API
                      - Peace
                      www.ifilters.net

                      Comment


                      • #12
                        Other then quick search, does anything have to use 1.3.1? Just curious, if your not using quick search can you use 1.7 or will it affect anything else on the site?

                        Comment


                        • #13
                          So, if it's that easy to fix, why doesn't 3dCart take care of it? Why should we have to do it? Just askin' . . .

                          Comment


                          • #14
                            Originally posted by rrw View Post
                            So, if it's that easy to fix, why doesn't 3dCart take care of it? Why should we have to do it? Just askin' . . .
                            Because that would require them to re-test all of their template pages that use javascript for compatibility. Upgrading yourself is a one-line code change in your frame template. I have not seen any incompatibilities with jquery 1.7 myself, besides quicksearch.

                            Comment


                            • #15
                              Ah, good reason!

                              Comment

                              Working...
                              X