I want to add loading effect before ajax call of remove product from the mini cart.

Right now when I remove the product from the cart, It takes 4-5 seconds to delete but user cannot identify whether the process is going on or not.

I tried to find JS file for the responsible code but not able to find it.

Does anyone have an idea which JS file contains code to call AJAX to remove the product from the cart?

enter image description here


2 Answers 2


You can check below file


it has events on click, can find something like _removeItem

If you are using any custom theme, it may be there under Magento_Checkout modules directory

  • Ok let me check
    – Khushbu
    Sep 5, 2019 at 6:57
  • How did you fix this? i dont get it working. Feb 6, 2020 at 14:02

I override below file in my custom theme


In place of _removeitem I put in _ajax method.

I show loading effect in beforeSend of that method and hide in complete

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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