Announcement

Collapse
No announcement yet.

Shipping / Billing State Issue

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

    Shipping / Billing State Issue

    For some reason, on our site and also the Luxe demo site, when you manually enter in customer information on OCST it doesn't change the state on the billing address and it gives an error. Since the billing address checkbox is checked a customer can't see what is wrong besides the fact it shouldn't be an error at all.
    Chris Dye
    http://www.kseriesparts.com

    #2
    No suggestions?
    Chris Dye
    http://www.kseriesparts.com

    Comment


      #3
      Hi Chris,
      I thought we had resolved that in an earlier release. I will check into it and let you know what I find.
      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


        #4
        Hi Chris,

        This is a bit of a puzzle. I am still looking into a possible solution.
        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
          Hi Chris,

          I believe the issue has been tracked down. In your scripts.js file within the jsOCST function, replace the window on load function with the following:

          Code:
          $(window).on('load', function () {
              var ShipCountry = $.hook('ShipCountry').find('select'),
                  ShipState = $.hook('ShipState'),
                  BillCountry = $.hook('BillCountry').find('select'),
                  BillState = $.hook('BillState');
          
              if (ShipCountry.val() === 'US') {
                  ShipState.children('input').addClass('h-visually-hidden').prop('disabled', true);
                  ShipState.children('select').removeClass('h-visually-hidden').prop('disabled', false);
              }
              else {
                  ShipState.children('input').removeClass('h-visually-hidden').prop('disabled', false);
                  ShipState.children('select').addClass('h-visually-hidden').prop('disabled', true);
              }
          
              if (!$('#billing_to_show').is(':checked')) {
                  if (BillCountry.val() === 'US') {
                      BillState.children('input').addClass('h-visually-hidden').prop('disabled', true);
                      BillState.children('select').removeClass('h-visually-hidden').prop('disabled', false);
                  }
                  else {
                      BillState.children('input').removeClass('h-visually-hidden').prop('disabled', false);
                      BillState.children('select').addClass('h-visually-hidden').prop('disabled', true);
                  }
              }
          });
          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 didn't realize that you responded to this with a fix. I did get it updated and it is working as expected now, thank you!
            Chris Dye
            http://www.kseriesparts.com

            Comment


              #7
              would this also be the change needed if it is happening on the account setup page?
              Chris Dye
              http://www.kseriesparts.com

              Comment


                #8
                Hi Chris,

                Yes, those blocks may need to be updated as well.
                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


                  #9
                  it is different enough code that I am not seeing the overlap for OCST to ACAD
                  Chris Dye
                  http://www.kseriesparts.com

                  Comment

                  Working...
                  X