magento2: Billing address information goes missing after refreshing Payment page on checkout
Preconditions
Magento 2.1.0
Steps to reproduce
- Go to checkout after adding a product to basket.
- Fill in the form and go to Payment page.
- Refresh the page.
- In the Payment Method selected uncheck the
My billing and shipping address are the same. - Check it back again.
Expected result
The Shipping and Billing Address will be the exactly same both on checkout and the basket.
Actual result
Apart from the Postal Code and Country every other information disappears.
Before Refresh:

After Refresh:

About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 18
- Comments: 67 (20 by maintainers)
Commits related to this issue
- Merge pull request #6817 from magento-tsg/2.4-develop-pr144 [Arrows] Fixes for 2.4 (pr144) (2.4-develop) — committed to magento/magento2 by zakdma 3 years ago
Seems to be fixed in 2.2.6
Same also on 2.2.2. 😦
There were several related bugs fixed. Please look at MAGETWO-58730 - commit e788a24. Github issue #6564 MAGETWO-58062 - commit f890acfa
Issue is still present on 2.2.3.
We are closing this issue due to inactivity. If anyone wants to update it, please reopen the issue.
@ebaschiera, have also second patch for
Magento_Checkoutin place which fixes an issue for me when I enter address in checkout, go to the payment tab and reload then page.I have the same issue using version 2.2.5 EE
I fixed this issue by disabling the persistent shoppingcart.
Stores -> Configuration -> Customers -> Persistent Shopping Cart -> Enable PersistenceI found it by debugging this Observer:
magento/module-persistent/Observer/CheckExpirePersistentQuoteObserver.php. This observer is triggered bycontroller_action_predispatch. In this file is are a few checks and if they pass they will expire the quote which will also removemage-cache-sessidcookie. This results in triggering this function:in the
magento/module-customer/view/frontend/web/js/customer-data.jsfile. Here thestorage.removeAll();will empty the localstorage.If you don’t want to disable persistent shopping cart, you need take a look at the checks in the Observer:
magento/module-persistent/Observer/CheckExpirePersistentQuoteObserver.php.With
!$observer->getControllerAction() instanceof \Magento\Checkout\Controller\Onepagethey try to prevent to lose the checkout data. But in my case I use custom modules like: PostNL which had their own controller actions in the checkout, so this check would pass and the localstorage was cleared.PS. There is allready an upcoming fix: https://github.com/magento/magento2/commit/bcffc4161e4960713922506870e1a4b711c5ca9e#diff-ee3a4dc8a625074b5313aa7d915944fd where the check is based on the requestUri. A side note is that if you leave the checkout page the localstorage is also cleared.
@elvinristi your patch works for me. Thanks!
I have the same issue in Magento 2.2.2
@SerhiyShkolyarenko @justinahsnyder @tkacheva @czettnersandor Guys any solution for magento 2.1.7 ?
hi @loganstellway Ultimately I got it working on 2.2.5 perfectly with a combination of https://github.com/magento/magento2/commit/bcffc4161e4960713922506870e1a4b711c5ca9e#diff-ee3a4dc8a625074b5313aa7d915944fd as mentioned by @sanderjongsma and module-checkout\view\frontend\web\js\checkout-data.js as mentioned by @elvinristi. I use the original customer-data.js now on 2.2.5. Also, I disabled Redis for the sessions while testing and left that disabled for now.
So I suggest you test editing @elvinristi solution on checkout-data.js first in combination with https://github.com/magento/magento2/commit/bcffc4161e4960713922506870e1a4b711c5ca9e#diff-ee3a4dc8a625074b5313aa7d915944fd as mentioned by @sanderjongsma with Redis for session-caching turned off. Our full page cache is on Varnish, but our test environment is not and it doesn’t make a difference.
@fk-whothat
if using this github for code then
if using
composerthenvendor/magento/module-checkout/view/frontend/web/js/checkout-data.js