magento2: When adding a product to shopping cart, it is not added to mini cart, but it is in /checkout/cart/

  1. Magento 2.1.0
  2. PHP 5.6.23

Steps to reproduce

  1. Load the catalog in frontend and add a product to shopping cart. No product are actually added to minicart
  2. If loading /checkout/cart/, products added are there.

Expected result

  1. To increase number in mini cart and when click on it, shopping cart layer should be displayed

Actual result

  1. Nothing displayed in mini cart and when clicked on it, a blank layer is shown

When inspecting JavaScript in Google Chrome developer tools, I found this when I load the catalog:

Uncaught TypeError: Unable to process binding "css: function (){return { empty:cart().summary_count == 0} }" Message: cart is not a function

in knockout.js.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 45 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Same issue here. No errors in the console - the minicart just doesn’t update.

Enabling the full-page cache, even on the community edition, solved the problem for me (Magento 2.1.2 in Dev mode)

Source: https://community.magento.com/t5/Technical-Issues/Shopping-Cart-doesn-t-load-in-Magento-2-1-0/td-p/41767

Do you want to elaborate with some details:

Magento version: Mode (developer or production): Caches on or caches off: Theme used: Is your theme using cart().summary_count or any other things mentioned in this thread? Anything else you can say about your observation of this bug:

Change the URL of your magento from localhost to 127.0.0.1 in core_config_data table in DB and clear cache. It will work for you.

@diglin Is there a way to prioritize issues? we cannot “Sell” Magento2 when basic things like this don’t work. look @ the sites here, they all have bugs (some of them are really slow) https://trends.builtwith.com/websitelist/Magento-2 Either Magento2 gets their act together or…

@treestonemedia there are tons of unit testing on PHP side. I don’t know how they handle testing on frontend side part. It’s quite a complex software with tons of possible combination, so I find difficult to test all of them. The worse is not that, we provide feedbacks and the issue in the latest release is still there.