I have developed site in Magento 2.2.0 and created custom product listing page.

I have used add to cart functionality using ajax but in console giving error:-

"VM1386:5 Expected to start loader but did not find one in the dom"

Any help will appreciate. Thanks.


I was facing add to cart issue after products loaded from ajax. I simply called catalogAddToCart function in my js success function and it worked. Please try this, hope it will resolve your issue.

jQuery( "form[data-role='tocart-form']" ).catalogAddToCart();

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.