Error in checkout - Billing address not updated when shipping address changed
Symptom
- Customer enters checkout,
- enters address,
- goes to payment step,
- chooses payment, sets "use same address as billing"
- payment fails due to invalid field or some address validation issue on payment side
- Customer clicks on the previous step to correct shipping address
- when customer clicks through and maintains "same address for billing" same error presents
Upon investigation it was found that the billing address within the quote_address table still has the originally entered address value with the problem data.
@lilmuckers Thank you for reporting this issue. Could you please provide details on the Magento version you are using and Payment methods you tested?
I am using 2.0.2 CE - and i tried it with Ebizmarts_SagePaySuite and with the standard checkmo
Edit with more detail
For the checkmo one - i put a test into the code to throw a validation exception within the class. I did this in a number of places after the billing address was saved to the quote (just to simulate a multitude of errors that might happen from validation to payment to whatever). And every time - it wasn't updating the billing address implicitly, only if i unchecked "same as shipping" and then modified the address directly.
@lilmuckers We have tried, but could not reproduce the issue you described. Is it possible to achieve same result using any of the stock online payment methods?
@lilmuckers Closing this ticket for now. Please reopen if the issue persists.
Hello,
I can replicate this issue on 2.0.4 CE and using stock payment methods. Steps to reproduce:
- put product in cart, proceed to checkout, enter shipping address, select shipping method, proceed to payment step: http://prnt.sc/axuakb
- go back to shipping step, introduce some changes: http://prnt.sc/axuazx
- go back to payment step (you may even change shipping method while at it)
- observe that billing address is not updated: http://prnt.sc/axub7b
- uncheck and check the checkbox and observe changes: http://prnt.sc/axubms
Hope this helps!
@lilmuckers I believe only you can reopen this ticket.
I am experiencing the same issue on 2.0.4.
Is this going to fix anytime soon?
I have the same issue.
Here is the steps to produce the issue.

I have filled the shipping address details and goes to the payment block and now i have reloaded the page and address will not be proper filled.
Thanks
@webdesk Guys, any solutions ?
@magento-engcom-team Any update on this?
any updates ? Issue still exists with the latest magento2 version..
You could fix this with a mixin that overrides the setShippingInformation function in file Magento_Checkout/web/js/view/shipping.js. Code:
define([
'jquery',
'underscore',
'Magento_Ui/js/form/form',
'ko',
'Magento_Customer/js/model/customer',
'Magento_Customer/js/model/address-list',
'Magento_Checkout/js/model/address-converter',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/action/create-shipping-address',
'Magento_Checkout/js/action/select-shipping-address',
'Magento_Checkout/js/model/shipping-rates-validator',
'Magento_Checkout/js/model/shipping-address/form-popup-state',
'Magento_Checkout/js/model/shipping-service',
'Magento_Checkout/js/action/select-shipping-method',
'Magento_Checkout/js/model/shipping-rate-registry',
'Magento_Checkout/js/action/set-shipping-information',
'Magento_Checkout/js/model/step-navigator',
'Magento_Ui/js/modal/modal',
'Magento_Checkout/js/model/checkout-data-resolver',
'Magento_Checkout/js/checkout-data',
'uiRegistry',
'mage/translate',
'Magento_Checkout/js/action/select-billing-address',
'Magento_Checkout/js/model/shipping-rate-service'
], function (
$,
_,
Component,
ko,
customer,
addressList,
addressConverter,
quote,
createShippingAddress,
selectShippingAddress,
shippingRatesValidator,
formPopUpState,
shippingService,
selectShippingMethodAction,
rateRegistry,
setShippingInformationAction,
stepNavigator,
modal,
checkoutDataResolver,
checkoutData,
registry,
$t,
selectBillingAddress
) {
'use strict';
return function (OriginalComponent) {
return OriginalComponent.extend({
setShippingInformation: function () {
if (this.validateShippingInformation()) {
selectBillingAddress(quote.shippingAddress());
setShippingInformationAction().done(
function () {
stepNavigator.next();
}
);
}
}
});
}
});
Hope this helps anyone who needs a quick fix. (@lilmuckers, @webdesk )
You could fix this with a mixin that overrides the setShippingInformation function in file Magento_Checkout/web/js/view/shipping.js. Code:
define([ 'jquery', 'underscore', 'Magento_Ui/js/form/form', 'ko', 'Magento_Customer/js/model/customer', 'Magento_Customer/js/model/address-list', 'Magento_Checkout/js/model/address-converter', 'Magento_Checkout/js/model/quote', 'Magento_Checkout/js/action/create-shipping-address', 'Magento_Checkout/js/action/select-shipping-address', 'Magento_Checkout/js/model/shipping-rates-validator', 'Magento_Checkout/js/model/shipping-address/form-popup-state', 'Magento_Checkout/js/model/shipping-service', 'Magento_Checkout/js/action/select-shipping-method', 'Magento_Checkout/js/model/shipping-rate-registry', 'Magento_Checkout/js/action/set-shipping-information', 'Magento_Checkout/js/model/step-navigator', 'Magento_Ui/js/modal/modal', 'Magento_Checkout/js/model/checkout-data-resolver', 'Magento_Checkout/js/checkout-data', 'uiRegistry', 'mage/translate', 'Magento_Checkout/js/action/select-billing-address', 'Magento_Checkout/js/model/shipping-rate-service' ], function ( $, _, Component, ko, customer, addressList, addressConverter, quote, createShippingAddress, selectShippingAddress, shippingRatesValidator, formPopUpState, shippingService, selectShippingMethodAction, rateRegistry, setShippingInformationAction, stepNavigator, modal, checkoutDataResolver, checkoutData, registry, $t, selectBillingAddress ) { 'use strict'; return function (OriginalComponent) { return OriginalComponent.extend({ setShippingInformation: function () { if (this.validateShippingInformation()) { selectBillingAddress(quote.shippingAddress()); setShippingInformationAction().done( function () { stepNavigator.next(); } ); } } }); } });Hope this helps anyone who needs a quick fix. (@lilmuckers, @webdesk )
this is not working for me. anyone got a solution ?