0

I am facing an issue of knockout JS file on my site bixlercollegiate.com. My products are being added, but when I click on checkout, the page becomes blank. When I checked my console on Chrome, the following were the errors found. Please suggest me what I should do in order to resolve this issue?

JQMIGRATE: Logging is active gtm.js Failed to load resource: the server responded with a status of 404 () knockout.min.js:302 Uncaught TypeError: Unable to process binding "css: function (){return { empty:!cart().summary_count} }" Message: cart is not a function
    at css (eval at createBindingsStringEvaluator (knockout.min.js:268), <anonymous>:3:72)
    at update (knockout.min.js:354)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:302)
    at evaluateImmediate (knockout.min.js:183)
    at Object.ko.computed.ko.dependentObservable (knockout.min.js:204)
    at knockout.min.js:302
    at Object.arrayForEach (knockout.min.js:17)
    at applyBindingsToNodeInternal (knockout.min.js:299)
    at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:288)
    at applyBindingsToDescendantsInternal (knockout.min.js:285) css @ VM1682:3 update @ knockout.min.js:354 ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:302 evaluateImmediate @ knockout.min.js:183 ko.computed.ko.dependentObservable @ knockout.min.js:204 (anonymous) @ knockout.min.js:302 arrayForEach @ knockout.min.js:17 applyBindingsToNodeInternal @ knockout.min.js:299 applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:288 applyBindingsToDescendantsInternal @ knockout.min.js:285 ko.applyBindingsToDescendants @ knockout.min.js:308 applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16 later @ underscore.min.js:41 knockout.min.js:302 Uncaught TypeError: Unable to process binding "css: function (){return { empty:!cart().summary_count} }" Message: cart is not a function
    at css (eval at createBindingsStringEvaluator (knockout.min.js:268), <anonymous>:3:72)
    at update (knockout.min.js:354)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:302)
    at evaluateImmediate (knockout.min.js:183)
    at Object.ko.computed.ko.dependentObservable (knockout.min.js:204)
    at knockout.min.js:302
    at Object.arrayForEach (knockout.min.js:17)
    at applyBindingsToNodeInternal (knockout.min.js:299)
    at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:288)
    at applyBindingsToDescendantsInternal (knockout.min.js:285) css @ VM1682:3 update @ knockout.min.js:354 ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:302 evaluateImmediate @ knockout.min.js:183 ko.computed.ko.dependentObservable @ knockout.min.js:204 (anonymous) @ knockout.min.js:302 arrayForEach @ knockout.min.js:17 applyBindingsToNodeInternal @ knockout.min.js:299 applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:288 applyBindingsToDescendantsInternal @ knockout.min.js:285 ko.applyBindingsToDescendants @ knockout.min.js:308 applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16 later @ underscore.min.js:41 knockout.min.js:302 Uncaught TypeError: Unable to process binding "css: function (){return { empty:!cart().summary_count} }" Message: cart is not a function
    at css (eval at createBindingsStringEvaluator (knockout.min.js:268), <anonymous>:3:72)
    at update (knockout.min.js:354)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:302)
    at evaluateImmediate (knockout.min.js:183)
    at Object.ko.computed.ko.dependentObservable (knockout.min.js:204)
    at knockout.min.js:302
    at Object.arrayForEach (knockout.min.js:17)
    at applyBindingsToNodeInternal (knockout.min.js:299)
    at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:288)
    at applyBindingsToDescendantsInternal (knockout.min.js:285) css @ VM1682:3 update @ knockout.min.js:354 ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:302 evaluateImmediate @ knockout.min.js:183 ko.computed.ko.dependentObservable @ knockout.min.js:204 (anonymous) @ knockout.min.js:302 arrayForEach @ knockout.min.js:17 applyBindingsToNodeInternal @ knockout.min.js:299 applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:288 applyBindingsToDescendantsInternal @ knockout.min.js:285 ko.applyBindingsToDescendants @ knockout.min.js:308 applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16 later @ underscore.min.js:41 knockout.min.js:302 Uncaught TypeError: Unable to process binding "css: function (){return { empty:!cart().summary_count} }" Message: cart is not a function
    at css (eval at createBindingsStringEvaluator (knockout.min.js:268), <anonymous>:3:72)
    at update (knockout.min.js:354)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:302)
    at evaluateImmediate (knockout.min.js:183)
    at Object.ko.computed.ko.dependentObservable (knockout.min.js:204)
    at knockout.min.js:302
    at Object.arrayForEach (knockout.min.js:17)
    at applyBindingsToNodeInternal (knockout.min.js:299)
    at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:288)
    at applyBindingsToDescendantsInternal (knockout.min.js:285) css @ VM1682:3 update @ knockout.min.js:354 ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:302 evaluateImmediate @ knockout.min.js:183 ko.computed.ko.dependentObservable @ knockout.min.js:204 (anonymous) @ knockout.min.js:302 arrayForEach @ knockout.min.js:17 applyBindingsToNodeInternal @ knockout.min.js:299 applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:288 applyBindingsToDescendantsInternal @ knockout.min.js:285 ko.applyBindingsToDescendants @ knockout.min.js:308 applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16 later @ underscore.min.js:41 knockout.min.js:302 Uncaught TypeError: Unable to process binding "css: function (){return { empty:!cart().summary_count} }" Message: cart is not a function
    at css (eval at createBindingsStringEvaluator (knockout.min.js:268), <anonymous>:3:72)
    at update (knockout.min.js:354)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:302)
    at evaluateImmediate (knockout.min.js:183)
    at Object.ko.computed.ko.dependentObservable (knockout.min.js:204)
    at knockout.min.js:302
    at Object.arrayForEach (knockout.min.js:17)
    at applyBindingsToNodeInternal (knockout.min.js:299)
    at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:288)
    at applyBindingsToDescendantsInternal (knockout.min.js:285) css @ VM1682:3 update @ knockout.min.js:354 ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:302 evaluateImmediate @ knockout.min.js:183 ko.computed.ko.dependentObservable @ knockout.min.js:204 (anonymous) @ knockout.min.js:302 arrayForEach @ knockout.min.js:17 applyBindingsToNodeInternal @ knockout.min.js:299 applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:288 applyBindingsToDescendantsInternal @ knockout.min.js:285 ko.applyBindingsToDescendants @ knockout.min.js:308 applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16 later @ underscore.min.js:41 knockout.min.js:302 Uncaught TypeError: Unable to process binding "css: function (){return { empty:!cart().summary_count} }" Message: cart is not a function
    at css (eval at createBindingsStringEvaluator (knockout.min.js:268), <anonymous>:3:72)
    at update (knockout.min.js:354)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:302)
    at evaluateImmediate (knockout.min.js:183)
    at Object.ko.computed.ko.dependentObservable (knockout.min.js:204)
    at knockout.min.js:302
    at Object.arrayForEach (knockout.min.js:17)
    at applyBindingsToNodeInternal (knockout.min.js:299)
    at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:288)
    at applyBindingsToDescendantsInternal (knockout.min.js:285) css @ VM1682:3 update @ knockout.min.js:354 ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:302 evaluateImmediate @ knockout.min.js:183 ko.computed.ko.dependentObservable @ knockout.min.js:204 (anonymous) @ knockout.min.js:302 arrayForEach @ knockout.min.js:17 applyBindingsToNodeInternal @ knockout.min.js:299 applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:288 applyBindingsToDescendantsInternal @ knockout.min.js:285 ko.applyBindingsToDescendants @ knockout.min.js:308 applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16 later @ underscore.min.js:41
0

It isn't just the checkout that's the issue, the minicart isn't working correctly on other pages to (such as the homepage).

This kind of error usually comes about when the templates are edited and dependencies such as the scope are removed.

To debug this I would recommend comparing/updating your template with the core one vendor\magento\module-checkout\view\frontend\templates\cart‌​.phtml (clear caches and delete var/view_preprocessed and pub/static/frontend and seeing if the issue still occurs. If it does not then update the code bit by bit until you find the issue.

  • Hi Ben.Thank you for your reply. I have tried the above but still its not working. Is there any other way? – topgun Jun 29 '17 at 9:37
  • If it doesn't work with the core template then it's a case of trying to eliminate the possible causes one by one. Has it ever worked? If so I would revert the code back to when it did work, and then add the changes one by one until you find the changes that caused it. – Ben Crook Jun 29 '17 at 9:41
  • I replaced the code backup for a version that worked. Do I need to replace the database too that matches that date's code in order for it to work? – topgun Jun 30 '17 at 5:13
  • It depends on the functionality and whether the issue is code or DB related, for most cases like this you shouldn't need to reset the DB but I can't say for sure. – Ben Crook Jun 30 '17 at 9:19
  • Well Ben, I tried all that too, but still the problem persists. Do you think this is a theme related issue>? I am using Porto 2.5 version ? Have you used this before on Magento EE 2.1.0? – topgun Jun 30 '17 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.