On checkout page, what is the class (PHP) that provides data to "mage-cache-storage", which is a key in 'Local Storage'. About 'Local Storage': https://superuser.com/questions/356494/what-is-store-in-local-storage-used-for-in-chrome

I'm interested specifically by 'shippingAddressFromData' object from JSON with key 'mage-cache-storage'.

I'd like to know where is the declaration in php/xml side of Magento 2 that links 'shippingAddressFromData' and the php code that provides the data for it.

2 Answers 2


I think the Shipping Address Data is loaded from the Checkout Config Object: https://github.com/magento/magento2/blob/develop/app/code/Magento/Checkout/Model/DefaultConfigProvider.php#L323

The Checkout is built from a single block with a pretty complex js layout, which then loads the ui components which render the checkout. (https://github.com/magento/magento2/blob/develop/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml#L11)

Somehow, the ui components have to receive the session specific data and configuration. I think this happens here: https://github.com/magento/magento2/blob/develop/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml#L26

The method getCheckoutConfig returns a merged config from a list of ConfigProviderInterfaces, which is implemented by the DefaultConfigProvider


Object returned by method shippingAddressFromData stored in browsers LocalStorage and was saved during filling shipping address form (on key press event)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.