I have added a custom add to cart button but due to its type submit it reloads the page and adds data to cart. now I have placed a div. by clicking on div I want to trigger an ajax request and add data to cart and on the response, I have to show a pop-up modal that shows the products in the cart.

Your Answer

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

Browse other questions tagged or ask your own question.