Announcement

Collapse
No announcement yet.

AJAX Add 2 Cart problem -- urgent

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

    AJAX Add 2 Cart problem -- urgent

    Might not be a Colossus issue. Add 2 Cart was working fine 2 days ago. This RT has minor mods and none to the prod page or basket and mini-basket.

    All the sudden today when testing, adding to the cart, the mini-basket was firing and the prod page wasn't reloading. There was a valid link to get to BASK page which worked. However, the quantity added to the cart doubled. The ADD 2 Basket button has an "?ajax=1" added to it. I removed that from the button definition and the mini-basket breakage doesn't show. ADD2Basket now goes directly to the BASK page, but the quantity is still doubling.

    If these are separate issues I need to solve the doubling of the quantity being added first.

    Hopefully, that makes sense.

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Thanks, Leslie.

    I added the ? to the button. It didn't fix doubled qty unfortunately.

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    Comment


      #3
      Looks like MM is adding the question mark if there is no URI.

      I notice in Javascript Resources that the "ajax-add-to-cart" is neither active or global. Setting those to ON were no help.

      Scott
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        ids - Can you post a link to the site?
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Has anything changed or been added having to do with click tracking? Some third-party scripts can cause the product to be added twice by piggy-backing or hijacking the original click. This would cause the mini-basket to show briefly and then proceed to the basket page. As for the "?ajax=1" in the URL, that is so the entire basket page does not have to load to populate the mini-basket.
          Matt Zimmermann

          Miva Web Developer
          Alchemy Web Development
          https://www.alchemywebdev.com
          Site Development - Maintenance - Consultation

          Miva Certified Developer
          Miva Professional Developer

          https://www.dev4web.net | Twitter

          Comment


            #6
            I think there are. I wouldn't have guessed that scenario. This was a recent conversion and Colossus was applied. Some of the old scripts that prev devs added were folded back into the site.

            Scott
            Need to offer Shipping Insurance?
            Interactive Design Solutions https://www.myids.net
            MivaMerchant Business Partner | Certified MivaMerchant Web Developer
            Competitive Rates, Custom Modules and Integrations, Store Integration
            AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
            My T-shirt Collection is mostly MivaCon T-shirts!!

            Comment


              #7
              I think I isolated the cause. It's the Google Enhanced eCommerce tracking code. I'm glad I know what, but we need to be able to track...

              Ideas?

              Need to offer Shipping Insurance?
              Interactive Design Solutions https://www.myids.net
              MivaMerchant Business Partner | Certified MivaMerchant Web Developer
              Competitive Rates, Custom Modules and Integrations, Store Integration
              AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
              My T-shirt Collection is mostly MivaCon T-shirts!!

              Comment


                #8
                Try relocating where the tracking code fires. I know google say put it at the top, but that's google. Set as the last thing to be called.
                Bruce Golub
                Phosphor Media - "Your Success is our Business"

                Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                phosphormedia.com

                Comment


                  #9
                  Bruce's thought kicked in a memory.

                  My memory is suspect in all this. Others and I were instrumental in rooting out the issue of using Enhanced eCommerce mode.

                  https://www.miva.com/forums/forum/ge...le-tag-manager

                  To summarize, GA item in most cases, and is in the default location in Colossus, in the global footer. If you are using Enhanced eCommerce mode the GA tag needs to be in the HEAD Tag.

                  Scott
                  Need to offer Shipping Insurance?
                  Interactive Design Solutions https://www.myids.net
                  MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                  Competitive Rates, Custom Modules and Integrations, Store Integration
                  AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                  My T-shirt Collection is mostly MivaCon T-shirts!!

                  Comment


                    #10
                    I may have something. In the Google Analytics Tracking Code template, change:
                    Code:
                    var mvga_tracker = new MVGA_Tracker( '<mvt:item name="ga_jsencode" param="ga_tracking:product_link_prefix" />', '<mvt:item name="ga_jsencode" param="category:name" />', '<mvt:item name="ga_jsencode" param="product:code" />', '<mvt:item name="ga_jsencode" param="product:name" />', mvga_basketitems, mvga_orderitems );
                    to:
                    Code:
                    AddEvent( window, 'load', function() {
                        if ( window.ga && ga.create ) {
                            var mvga_tracker = new MVGA_Tracker( '<mvt:item name="ga_jsencode" param="ga_tracking:product_link_prefix" />', '<mvt:item name="ga_jsencode" param="category:name" />', '<mvt:item name="ga_jsencode" param="product:code" />', '<mvt:item name="ga_jsencode" param="product:name" />', mvga_basketitems, mvga_orderitems );
                        }
                    });
                    Matt Zimmermann

                    Miva Web Developer
                    Alchemy Web Development
                    https://www.alchemywebdev.com
                    Site Development - Maintenance - Consultation

                    Miva Certified Developer
                    Miva Professional Developer

                    https://www.dev4web.net | Twitter

                    Comment


                      #11
                      Thanks, Matt. I'll give this a try when I get a chance.

                      Is the GA item a Render Blocking script?
                      Do you think this change will allow me to move the GA item call back to the footer which could solve that issue?

                      Scott

                      Need to offer Shipping Insurance?
                      Interactive Design Solutions https://www.myids.net
                      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                      Competitive Rates, Custom Modules and Integrations, Store Integration
                      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                      My T-shirt Collection is mostly MivaCon T-shirts!!

                      Comment


                        #12
                        It could, I am not certain.
                        Matt Zimmermann

                        Miva Web Developer
                        Alchemy Web Development
                        https://www.alchemywebdev.com
                        Site Development - Maintenance - Consultation

                        Miva Certified Developer
                        Miva Professional Developer

                        https://www.dev4web.net | Twitter

                        Comment


                          #13
                          Scott how did you resolve the issue with additional quantity for ADPR?

                          We're experiencing this exact same issue. Last evening the ADPR action started loading a css-lacking version of the mini-basket. Like Scott I discovered that removing the ?ajax=1 from the ADPR button fixed that issue. But also like him I discovered that the quantity is now doubling when adding to basket. I tried Matt's suggested change to the tracking template with no luck. I'm still working on it but was curious if anyone had a solution and save me some time.

                          Thanks,
                          Michael

                          Comment


                            #14
                            Hey Mike,

                            I had to move the GA item into the head tag because this store is using the Google Enhance eCommerce option.

                            -When you enable the module, any old settings (it's a converted store) are ignored.
                            -The ITEM is placed at the bottom of your pages

                            I needed to re-enter the GA ID, switch the setting back to Enh eCom and copy the old version of that script into the new store. This is when I started to see the errors of double qty. The solution for me was to move the ITEM to the HEAD tag.

                            I haven't tried Matt's suggestion yet. I will eventually so that I might be able to get this out of the way. It could be a Render Blocking script, but I'm not sure.

                            Scott

                            Need to offer Shipping Insurance?
                            Interactive Design Solutions https://www.myids.net
                            MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                            Competitive Rates, Custom Modules and Integrations, Store Integration
                            AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                            My T-shirt Collection is mostly MivaCon T-shirts!!

                            Comment

                            Working...
                            X