If you want to add product in minicart Magento 2 with Ajax, follow below way:
– Open addtocart.phtml file in your theme directory:
app/design/frontend///Magento_Catalog/templates/product/view
– Modify the bindSubmit function
1 2 3 4 5 6 7 |
{ "#product_addtocart_form": { "catalogAddToCart": { "bindSubmit": true } } } |