Magento2 Mini Cart Items Issue
Hello ,
- After login , i can not see items in minicart .
- when i click on add to cart from home page widget products , mini cart not displaying add items .
Can you please help ?
Thanks
@wclansar Thank you for reporting. Could you please provide more precise steps to reproduce? Which Magento version are you using? Any errors in browser console?
Hello i am using magento 2.0.4
There is not error in console.
Hello @wclansar and @ansarhusain, we tried to reproduce this issue by next case:
- Clone magento from GitHub: git clone https://github.com/magento/magento2.git (this is "develop" branch)
- Then switch branch to 2.0: git checkout -f 2.0
- Install Magento 2 (with default values during web installation, sample data is not used)
- After installation, login to admin
- Go to Products > Catalog and click "Add Product"
- Then fill all required fields for creating simple product:
- Name = simple product
- SKU = simple product
- Price = 10
- Tax Class = Taxable Goods
- Quantity = 1
- Categories = test (click "New Category" and create category "test" as child for "Default Category")
- Save the product(all other settings in default state)
- Go to Storefront as Guest (the same result if we use registered customer)
- Click for open "test" category
- Click "Add to Cart" button
Result:
- Product is added to cart
- Mini cart has 1 product(simple product)
- Red Icon with number 1 is presented near mini cart
Could you pls provide more information about Your Magento 2 and server settings, like
- Which version of PHP do you use, php 7.0.4?
- Do You use Varnish or not?
- Do You use Redis or not?
- Do You use HTTPS or HTTP for Storefront and admin?
- Do You use Sample Data?
- Which Magento 2 mode do You use? (default/develop/production)
- Do You use Definition compilation Tool after installation?
- Do You use Static Content Deploy after installation?
- Do You use JS minification ?
- Do You use JS Bundling?
- Do You use JS merge?
- Do You use HTML minification?
- Do You use Flat Catalog Product?
- Do You use CDN as Static Content?
- Wich browser do You use? (Firefox/Chrome/IE) Probably there is other specific configuration that we miss.
Having the same issues here - https://utilitnetworks.com/ - item added to cart, but the mini-cart is not displaying any contents.
- PHP Version 5.6.20-1+deb.sury.org~trusty+1
- No Varnish, Redis
- HTTPS only
- No Sample Data
- Current application mode is default
- No javascript bundling, merge, or minify.
- No CSS merge or minify.
- No HTML minify.
- Enabled Single Store Mode.
- No CDN
- Chrome browser.
Anyone else having this issue? we are unable to replicate. Do you see any errors in the browser console or any failed AJAX requests?
Yes. On 2.1.0-RC1, not sure what it was like on 2.0.6 as I upgraded right away. Chrome console says the following, along with the screen capture. Hopefully that is sorta helpful.
knockout.js:3012 Uncaught ReferenceError: Unable to process binding "foreach: function (){return { data:cookieMessages,as:'message'} }"
Message: cookieMessages is not defined
knockout.js:3012 Uncaught ReferenceError: Unable to process binding "css: function (){return { empty:!!getCartParam('summary_count') == false} }"
Message: getCartParam is not defined

Internal issue MAGETWO-53432
I have the same issue:
Magento 2.0.7 PHP Version 7.0.4. No Varnish, Redis HTTPS only No Sample Data Current application mode is default No javascript bundling, merge, or minify. No CSS merge or minify. No HTML minify. Enabled Single Store Mode. No CDN Chrome browser.
Thanks for reporting issue. Internal ticket MAGETWO-53766
@longbeachjamie, I tried it on your store and minicart worked properly. As admin you may recheck my cart(created user with my real first and last name).
Can confirm that this bug happens in 2.0.7. as well. We have a Magento installation where we had huge problems after update yesterday. Since then the mini cart only shows the amount of products (if it does it anyway...). MIni cart is empty, even with 20 Items in Cart.
Maybe a Update-Bug?
@kingalca, yes, it may be. Which release you updated from?
@SerhiyShkolyarenko we updated from 2.0.4. iirc. (So .0.4 => .0.7)
Just an observation, as I am having this same issue.
Landing on /checkout/cart after adding a product from a page that doesn't use the product widget to add it, then navigating back to the home page and trying to add a product using the product widget fixes the bug until the cookies are cleared. I suspect there is some JavaScript that isn't running correctly on the home page regarding the cookie generation.
As a side note, landing on checkout/cart with no products in the cart, will not fix the bug, a product must be added from a page with (for example a category page (layout: catalog_category_view.xml)) before landing on checkout/cart.
Hopefully this information is helpful.
I can confirm this @thills03! I Click on add-to-cart Button on Home-Site in Widget and minicart and even the red Counter stay empty. If i go to cart page, Item is added. Only if I add an item the normal way (on product or category Page) the item appears in minicart.
Hello BeniSt ,
can you check is your cache disable ?
Because it seems that issue comes when cache off .
Thanks
We have cache on and the issue, so disabled caching can't really be the issuer here.
Yes, in my case you are right. If I enable cache, the minicart works as it should. Cool. Thanks!
Welcome Brother BeniSt !!!!!!!!
@thills03 what do you mean by words "adding a product from a page that doesn't use the product widget to add it" ?