-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Backport] fixed - Unable to select payment method according to country of the address at checkout time #18908
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
Conversation
…ddress at checkout time
|
Hi @rahulwebkul. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
|
I was facing the same issue in Magento 2.2.1. The basic issue is solved, but there is another issue, If I click on other addresses or input new shipping address, the payment methods are not reloading i.e. required for changing the available methods. Please help. |
|
@PrithweemaD - I will look into the issue. |
|
Hi @VladimirZaets, thank you for the review. |
…ding to country of the address at checkout time #18908
|
Hi @rahulwebkul. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
|
@VladimirZaets @rahulwebkul This pull requests causes the billing address to be reset to the shipping address after every shipping information save. In our case for example we build a store pick up function. After you select a store, we do a saveShippingInformation-call and set the address of the store as shipping address. After this fix, every time we do this, the billing address of the customer is set to the shipping address of the store. I think the original code is correct. You only want to set the billing address to be the same as the shipping address if no billing address is set. If a billing address is set, it should not change to be the same as the shipping address. @VladimirZaets I would suggest to revert this change. |
|
Agree with @luukschakenraad. It's not convenient for customers in current implementation. Take a look at how it's looks like in 2.2.8 (the only Magento version with this patch):
I think the correct way of this PR is something like this (didn't test it, though): if ((!quote.billingAddress() ||
quote.billingAddress().isAddressSameAsShipping()) &&
quote.shippingAddress().canUseForBilling()) {
selectBillingAddressAction(quote.shippingAddress());
} |
Description (*)
I think we should remove check !quote.billingAddress() in file Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js
Due to this we are getting address which is selected first time.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)
Backport for #18909