-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix shipping address can use for billing #10130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix shipping address can use for billing #10130
Conversation
Use current shipping address as billing address only if address is marked as canUseForBilling
Hi @tufahu |
Hi @ishakhsuvarov! The base functionality has no problem with this implementation, because base address classes have canUseForBilling is hardcoded with value true. refs: So every time magento, handle all address can be used for billing too. I've written a magento shipping module (shipping to pickup points) where I add a new address at checkout process to quote. These are only shipping adresses (gasoil stations etc), what i want is to customer cannot select address as billing too, and customer have to set a different billing address. The current implementation ignores this. If i set canUseForBilling false on address, magento add the choice for customer to tick [x] billing and shipping is the same which is wrong. |
And if you read the default code part
If there is no billing address -> set shipping Address as Billing Address
If there is no billing address -> set shipping Address as Billing Address if this Shipping Address Can be used for Billing |
@tufahu What happens with the billing address controls in this case? Is it handled properly by default? I'm afraid we may get into the case where customer attempts to place an order with no billing address at all and will get an exception from the API call. I'll check out the branch and do some testing to get the better grip of the idea. |
[EngCom] Public Pull Requests - MAGETWO-70817: remove redundant else and use strict check #10271 - MAGETWO-70787: update phpserver to support versioned static urls #10250 - MAGETWO-70764: Fix overwrite default value image/file with NULL #10253 - MAGETWO-70761: Show values that are duplicate in attribute error msg #10213 - MAGETWO-70758: Fix for #4530 $product->getRatingSummary() always returns null […] #10248 - MAGETWO-70706: simplify product lists #2 #9019 - MAGETWO-70669: Fix fatal errors with deleteOptionsAndSelections #7711 - MAGETWO-70464: Fix shipping address can use for billing #10130 - MAGETWO-69913: magento/magento2 #9196 - Products ordered report doesn't show simple (child) products of configurable products #9908
Sorry i've missed to answer to this thread. It is handled properly by default, without any problems. Thanks! |
Description
Fix bug on checkout process, when billing address is empty at quote and magento tries to use shipping address as billing address. Currently it ignores the property of address canUseForBilling.