- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2022
04:08 AM
09-29-2022
04:08 AM
So i have to redo Ajax Cart for simple product as a home work, now i need to stop the page from redirect to check out after i press Add to cart button in category page. I have tried return false; and event.preventDefault(); on event submit to no avails. Can someone suggest me on what to do to achieve that. Many thanks
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2022
02:11 AM
10-03-2022
02:11 AM
Figured it out myself, just change button attribute type='submit' to type='button' then use ajax to send product id to controller to add product to cart then use sections.xml to update the cart.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2022
02:11 AM