I have a magento 2 website and I am facing an issue where After you add to cart, cart page is showing empty.

It's not happening all the time but most of the customers are facing this issue.


  • Hello did you ever find a cause for this? I'm hoping for some help at least to troubleshoot a similar problem but so far I have no idea where to start.
    – jamil
    Aug 21, 2018 at 18:05
  • Which version of magento 2 you are using, Can you please try to disable Full Page Cache then check it?
    – Saphal Jha
    Aug 21, 2018 at 18:25
  • I'm on 2.2.4. The problem is rare and unpredictable, maybe 1 out of 50 users... certainly less are reporting it and there is nothing correlating in my logs to be certain either way. Disabling full page cache could be a disaster on my live site and like I said I can't recreate the issue on my own to test.
    – jamil
    Aug 21, 2018 at 22:28
  • @jamil please check below answer, this will work.
    – Saphal Jha
    Aug 23, 2018 at 7:46
  • Thanks, but my settings were already the same, except Cookie Lifetime. I have changed Cookie Lifetime to match my php setting session.gc_maxlifetime, although I'm not sure if this matters.
    – jamil
    Aug 23, 2018 at 16:44

2 Answers 2


You should enable this:

Magento Admin > Stores > Settings / Configuration > General / Web > Default Cookie Settings

enter image description here

  • this did not solve in my case. I had to clear the session in var folder. rm -rf var/session/*
    – Laxman
    Jan 13, 2021 at 12:07

In my case, this was caused by a Magento module not being enabled.

If you enable Magento_Persistent this issue will be fixed.

  • The Magento_Persistent module was already enabled. There seems issue with the session id generation. On my case, the issue was gone by clearing the session rm -rf var/session/*
    – Laxman
    Jan 13, 2021 at 12:09

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.