magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Magento2 Mini Cart Items Issue

Open wclansar opened this issue 10 years ago • 70 comments

Hello ,

  1. After login , i can not see items in minicart .
  2. when i click on add to cart from home page widget products , mini cart not displaying add items .

Can you please help ?

Thanks

wclansar avatar Apr 15 '16 11:04 wclansar

@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?

ishakhsuvarov avatar Apr 15 '16 13:04 ishakhsuvarov

Hello i am using magento 2.0.4

There is not error in console.

ansarhusain avatar Apr 15 '16 13:04 ansarhusain

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.

sdzhepa avatar Apr 15 '16 14:04 sdzhepa

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.

longbeachjamie avatar Apr 26 '16 18:04 longbeachjamie

Anyone else having this issue? we are unable to replicate. Do you see any errors in the browser console or any failed AJAX requests?

piotrekkaminski avatar May 24 '16 15:05 piotrekkaminski

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

image

krlecarp avatar May 24 '16 15:05 krlecarp

Internal issue MAGETWO-53432

piotrekkaminski avatar May 24 '16 16:05 piotrekkaminski

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.

BeniSt avatar May 29 '16 15:05 BeniSt

Thanks for reporting issue. Internal ticket MAGETWO-53766

tkacheva avatar May 31 '16 15:05 tkacheva

@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).

SerhiyShkolyarenko avatar Jun 01 '16 14:06 SerhiyShkolyarenko

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?

grasdaggel avatar Jun 01 '16 14:06 grasdaggel

@kingalca, yes, it may be. Which release you updated from?

SerhiyShkolyarenko avatar Jun 01 '16 14:06 SerhiyShkolyarenko

@SerhiyShkolyarenko we updated from 2.0.4. iirc. (So .0.4 => .0.7)

grasdaggel avatar Jun 01 '16 14:06 grasdaggel

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.

thills03 avatar Jun 01 '16 17:06 thills03

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.

BeniSt avatar Jun 01 '16 19:06 BeniSt

Hello BeniSt ,

can you check is your cache disable ?

Because it seems that issue comes when cache off .

Thanks

wclansar avatar Jun 02 '16 08:06 wclansar

We have cache on and the issue, so disabled caching can't really be the issuer here.

grasdaggel avatar Jun 02 '16 08:06 grasdaggel

Yes, in my case you are right. If I enable cache, the minicart works as it should. Cool. Thanks!

BeniSt avatar Jun 02 '16 08:06 BeniSt

Welcome Brother BeniSt !!!!!!!!

wclansar avatar Jun 02 '16 08:06 wclansar

@thills03 what do you mean by words "adding a product from a page that doesn't use the product widget to add it" ?

SerhiyShkolyarenko avatar Jun 02 '16 13:06 SerhiyShkolyarenko