cancel
Showing results for 
Search instead for 
Did you mean: 

Why Magento 2.1 Minicart is always empty if Guest

Why Magento 2.1 Minicart is always empty if Guest

Just wondering why our cart is always empty if Guest user? if i access /checkout/cart all items are in there and complete but the minicart still shows "You have no item - - - - - -" . If I use a User registered account then everything works fine. We are using KO to reload someparts of the site but I think the parts for minicart are not being triggered for Guest user, Do you think we missed some admin settings? 

1 REPLY 1

Re: Why Magento 2.1 Minicart is always empty if Guest

I would report it as a GitHub issue with instructions how to repeat etc and get the core Engineers to have a look. Sounds like a bug on the surface... I would have a struggle describing why the mini cart being empty is a "feature".

 

Otherwise I wonder if what is happening is some context or cookie is not being maintained correctly between requests. I dont recall the details, but registered versus guest session tracking is a bit different.

 

Also there are different APIs for guest and registered user accounts. (The function calls take different arguments.) If mini cart got confused between the two modes and the wrong APIs were being used to add items to the cart, that might make a difference as well. Have you are doing any of your own code in this area, have you checked you are using the right API? Or that your calls have all the required arguments (being slightly different in some cases for guest vs registered user access)?

 

Did it work in 2.0 by the way? Some security aspects have been improved as well - it may be something permitted before has been closed as a potential security issue. (Again sorry, dredging up recollections from a patchy memory.)