Announcement

Collapse
No announcement yet.

Remember Check Box State for Bill To / Ship To on OCST

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

    Remember Check Box State for Bill To / Ship To on OCST

    I was wondering if there is a way to have the Same as Bill To / Ship To check box state remembered when going through check out.

    For starters we are on the Suivant ReadyTheme and the Bill To Address is the Default Address.

    A little background:

    Our fraud protection settings on the PayPal Payments Advanced and/or Payflow Gateway requires the Bill To Address to match the credit card being used.

    So, to help combat confusion for the customer we added the Bill To Address Information with an Edit Link (back to OCST) next to the Payment fields on OPAY.

    This has been helping a lot. Huge decrease in Authorization Failures.

    However, there is still a certain situation that has caused some issues for some of our customers.
    1. Customer unchecks check box and enters a different Ship To Address on OCST
    2. Selects shipping/payment on OSEL
    3. On OPAY they notice they need to change their Bill To address to match their credit card.
    4. Click link to edit address
    5. Now when they are brought back to OCST and the Ship To check box is checked again.
    If they don't know to uncheck the check box, which is common, they are now shipping to the billing address which is not ideal behavior.

    Sure they might notice and go back to fix it, but I'm trying to create as little friction in the check out process as possible. Friction creates frustration and in some cases lost sales.

    If anyone happens to know a fix for this or can at least point me in the right direction, that would be great.

    Again,

    I'm trying to have the check box state remembered for the Ship To fields on OCST.

    We are on the Suivant ReadyTheme and the Bill To Address is the Default Address.

    Thanks
    Nick Harkins
    www.loveisarose.com
    *Web Developer
    *Miva
    *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

    #2
    Is this happening for customer with accounts or for both with and without accounts?
    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


      #3
      It is happening for both.



      I think I may have found something to be part of the problem.

      Since I wanted the Ship To Check box to be checked by default for all screen sizes I changed a snippet of code in the scripts.js file to this:

      Code:
              // ---- Toggle Customer Fields Controls ---- //        
      
      
              if ($(window).innerWidth() > 300) {
                  $('#shipping_to_show').click();
              };
      
              if ($('p.message-error').length) {
                  $('#shipping_to_show').click();
              };
      I think by default with the Suivant ReadyTheme is was this:

      Code:
              // ---- Toggle Customer Fields Controls ---- //        
      
      
              if ($(window).innerWidth() > 960) {
                  $('#shipping_to_show').click();
              };
      
              if ($('p.message-error').length) {
                  $('#shipping_to_show').click();
              };
      I'm pretty sure that is the cause of the issue of the box being checked anytime the OCST page is accessed.

      Is it possible to have that box checked by default and if a customer unchecks the box, the check box state will be remembered?

      Just in case they need to go back to OCST from OPAY to edit the billing address.
      Nick Harkins
      www.loveisarose.com
      *Web Developer
      *Miva
      *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

      Comment


        #4
        I also checked out the new Colossus ReadyTheme and it has the same behavior.

        Ship To is default though and Bill To has the toggle.

        If a different Bill To Address is entered and then you happen to click the edit button by the shipping address on OPAY, the Bill To check box is checked again on OCST.
        Nick Harkins
        www.loveisarose.com
        *Web Developer
        *Miva
        *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

        Comment


          #5
          Hmm, on OCST, you could try removing this section:
          Code:
          <mvt:if expr="l.settings:customer:match">
              <mvt:if expr="l.settings:customer:primaddr EQ 'shipping'">
                  <script>document.getElementById('billing_to_show').checked = true;</script>
              <mvt:elseif expr="l.settings:customer:primaddr EQ 'billing'">
                  <script>document.getElementById('shipping_to_show').checked = true;</script>
              </mvt:if>
          </mvt:if>
          Then, in you link from OPAY to OCST, include this parameter:
          Code:
          &shipping_to_show=0
          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
            Okay I can give that a shot.

            Where do I add that parameter?


            This is how the link is coded:

            Code:
            <a href="https://&mvt:global:domain:name;/OCST.html" class="button corners">Edit Address</a>
            Also should I remove this snippet from the scripts.js file?

            Code:
             
                     if ($(window).innerWidth() > 300) {             $('#shipping_to_show').click();         };

            Thanks
            Nick Harkins
            www.loveisarose.com
            *Web Developer
            *Miva
            *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

            Comment


              #7
              Change the link to this and you should be able to remove the conditional from scripts.js.
              Code:
              <a href="https://&mvt:global:domain:name;/OCST.html&shipping_to_show=0" class="button corners">Edit Address</a>
              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


                #8
                Unfortunately, the link brings me to the NTFD page. "Requested Item Not Available"

                Also after removing that snippet from the scripts file, the Ship To check box is no longer checked by default when coming to OCST for the first time

                Deleted my basket and started fresh like a new customer would to check that.
                Nick Harkins
                www.loveisarose.com
                *Web Developer
                *Miva
                *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

                Comment


                  #9
                  Oops...wrong token. Try this:
                  Code:
                  <a href="https://&mvt:global:domain:name;/OCST.html?shipping_to_show=0" class="button corners">Edit Address</a>
                  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


                    #10
                    Awesome thanks for that.

                    Now how can we have that box checked by default when coming to OCST for the first time?

                    After removing that snippet from the scripts.js file it is no longer checked by default for the first visit to OCST
                    Nick Harkins
                    www.loveisarose.com
                    *Web Developer
                    *Miva
                    *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

                    Comment


                      #11
                      Maybe try this:
                      Code:
                      <mvt:if expr="ISNULL g.shipping_to_show">
                          <script>document.getElementById('shipping_to_show').checked = true;</script>
                      </mvt:if>
                      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


                        #12
                        Fantastic! Works beautifully.

                        Thank you Matt.
                        Nick Harkins
                        www.loveisarose.com
                        *Web Developer
                        *Miva
                        *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

                        Comment

                        Working...
                        X