When login with social login like Facebook, Gmail, the mini cart items count is showing 0 and when I click on cart page then it will reload the count.

In Default Magento Login is working fine. Please refer my below screenshot for reference.

enter image description here

enter image description here


1 Answer 1


I'm not sure about your custom logic on header. By default, the mini cart on header will get data from localstorage.

I have some suggestions:

1) Reload the cart section.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
    <action name="sociallogin/popup/customer">
        <section name="checkout-data"/>
        <section name="cart"/>

2) The mini cart on header gets data from localstorage. We should follow the localstorage logic.


3) Browser cache

Status Code: 200 OK (from disk cache)
Pragma: cache

200 (from memory cache) - file found in browser, so browser is not going request from server

enter image description here


Magento 2 comes from with Varnish cache. Using Varnish on your server can resolve the disk cache issue.


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.