Skip to content
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

[SOLVED] CheckoutData and shipping/billing informations missing on payment selection #33

Open
ghost opened this issue Oct 22, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 22, 2021

Preconditions

Magento 2.x

Steps to reproduce

  1. Go to Checkout as Guest
  2. Add shipping information
  3. Click on COD payment
  4. Refresh page

Expected result

Shipping and Billing address are maintained.

Actual result

Shipping and Billing are missing, since checkout-data from LocalStorage (mage-cache-storage) is being deleted on payment selection.
image

How to fix

file view/frontend/web/js/view/payment/method-renderer/cashondelivery.js, add false after row 71.

before

return storage.put(
	serviceUrl,
	JSON.stringify(payload),
).done(function () {
	cashondelivery.canShowCashOnDelivery(quote.paymentMethod().method == 'msp_cashondelivery');
	getTotalsAction([]);
	fullScreenLoader.stopLoader();
});

after

return storage.put(
	serviceUrl,
	JSON.stringify(payload),
	false
).done(function () {
	cashondelivery.canShowCashOnDelivery(quote.paymentMethod().method == 'msp_cashondelivery');
	getTotalsAction([]);
	fullScreenLoader.stopLoader();
});
@ghost ghost changed the title CheckoutData and shipping/billing informations missing on payment selection [SOLVED] CheckoutData and shipping/billing informations missing on payment selection Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants