How can we set the default so that the “My billing and shipping address are the same” as NOT checked. Right now the default is checked. Thanks!
3 answers
Hi there,
How can we set the default so that the “My billing and shipping address are the same” as NOT checked.
You can implement that using the following quick workaround:
1. Open the Javascript file at: app/code/Ubertheme/Checkout/view/frontend/web/js/view/billing-address.js
and find the code lines:
afterResolveDocument: function () {
this.saveBillingAddress();
//initial google auto complete if it was enabled
if (window.checkoutConfig.ubCheckoutConfig.googleAutoCompleteEnabled) {
new googleAddressAutoComplete('billing');
}
},
and replace it with:
afterResolveDocument: function () {
this.saveBillingAddress();
//initial google auto complete if it was enabled
if (window.checkoutConfig.ubCheckoutConfig.googleAutoCompleteEnabled) {
new googleAddressAutoComplete('billing');
}
this.isAddressSameAsShipping(false);
},
2. Then re-deploy static files in your site and clean the M2 cache.
Regards,
Mall.
Wonderful, thank you so much! If anyone else wants to modify this without modifying the plugin itsel, you can copy the billing-address.js and put it into your theme/Ubertheme_Checkout/web/js/view/billing-address.js and then cleaning cache didn’t seem to work for me so I deleted everything in the pub/static directory except for the .htaccess file and then redeployed the static files and everything worked wonderfully well.
Thank you Mall for the help!
Hi there,
We’re glad that it helped.
If you have any additional questions, please get back to us here.
Meanwhile, we wonder if you have any new M2 project that needs a new theme. Please take a look at our UB Atoms here -- our 1st premium M2 theme in 2021 to see if it’s a good fit. This theme has been entirely revamped not like any of our previous M2 theme.
PS. We’d like to offer you 20%OFF if you decide to try the UB Atoms theme.
Regards,
Ubertheme team