- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2017
07:31 AM
04-07-2017
07:31 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2017
12:29 PM
04-11-2017
12:29 PM
Re: uncheck "Billing same as shipping" by default in checkout
Nobody ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2017
07:32 PM
04-12-2017
07:32 PM
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:
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.