Skip to content

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

Description

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();
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions