Magento – Magento2 Order Summary – unable to process binding

checkoutknockoutjsmagento-2.1magento2

I'm getting issues with the Order Summary on the checkout of my magento2 site.

No products or information about the order is being displayed at all and in console I get a knockoutjs error which I'm struggling to see how it helps.

Uncaught ReferenceError: Unable to process binding "if: function (){return maxCartItemsToDisplay < getCartLineItemsCount() }"

Message: maxCartItemsToDisplay is not defined
at if (eval at createBindingsStringEvaluator (knockout.js:2624), :3:55)
at ko.computed.disposeWhenNodeIsRemoved (knockout.js:3989)
at evaluateImmediate (knockout.js:1737)
at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
at init (knockout.js:3988)
at knockout.js:2989
at Object.ignore (knockout.js:1249)
at knockout.js:2988
at Object.arrayForEach (knockout.js:151)
at applyBindingsToNodeInternal (knockout.js:2974)

Any help with this or how to debug this would be appreciated.

Best Answer

Recently I've updated magento with 2.1.8 version and got the same issue. maxCartItemsToDisplay variable was added in the new version and is used in the next files

vendor/magento/module-checkout/Model/Cart/CheckoutSummaryConfigProvider.php
vendor/magento/module-checkout/view/frontend/web/js/view/summary/cart-items.js
vendor/magento/module-checkout/view/frontend/web/template/summary/cart-items.html

If you rewrite some of these files you can get an error with summary block on checkout. In my case cart-items.js has been rewritten by Smartwave theme, so I just added the changes to it.

I hope this will be useful to you.

Related Topic