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
Nobody ??
We need to modify applyBillingAddress function in vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js around line 231:
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 :
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.