Magento – Unable to process binding Knockout.js magento 2

magento2mini-cart

I have created a new theme in Magento 2 and rewritten minicart.phtml, but when adding product to cart, mini-cart does not show items and have error JS (knockout.js) like this:

Uncaught TypeError: Unable to process binding "if: function (){return getCartParam('summary_count') }"
Message: Unable to process binding "foreach: function (){return { data:getCartParam('items'),as:'item'} }"
Message: Unable to process binding "foreach: function (){return $parent.getRegion($parent.getItemRenderer(item.product_type)) }"
Message: Cannot read property 'configurable' of undefined

Please help me fix this bug, thanks for all.

Best Answer

Replace the minicart.phtml and content.html file from your theme with core template (vendor\magento\module-checkout\view\frontend\templates\cart‌​) , (vendor\magento\module-checkout\view\frontend\web\template\minicart\content.html).

Run the following commands -

  1. rm -rf pub/static/frontend
  2. rm -rf var
  3. php bin/magento setup:static-content:deploy -f

I hope it will help you.

Related Topic