cancel
Showing results for 
Search instead for 
Did you mean: 

uncheck "Billing same as shipping" by default in checkout

uncheck "Billing same as shipping" by default in checkout

Anyone know how to set the Billing is the same as Shipping address on the checkout page to default to unchecked ? Currently it defaults to checked

2 REPLIES 2

Re: uncheck "Billing same as shipping" by default in checkout

Nobody ??

Re: uncheck "Billing same as shipping" by default in checkout

We need to modify applyBillingAddress function in vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js around line 231:

applyBillingAddress

And comment out this part:

/*                if (shippingAddress &&
                    shippingAddress.canUseForBilling() &&
                    (shippingAddress.isDefaultShipping() || !quote.isVirtual())
                ) {
                    selectBillingAddress(quote.shippingAddress());
                }  
*/

And we need to modify file vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js :

vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js

And commend out code around line 34:

 

/*
               if (!quote.billingAddress()) {
                   selectBillingAddressAction(quote.shippingAddress());
               }  
*/

 

Magento best practices tell you to wrap it up as an extension.

 

Here is a step by step guide.