How to NOT open cart page after adding to cart? (custom homepage button)

Hi all,

I added a custom button to my homepage product grids:

When I add something to the cart, the cart page opens, but I just want it do add it to cart (and add text, like: “Product added!” or something) instead of opening the cart page, since it’s quite annoying.

On the product pages, it works like I want it to, but not on the homepages. Any help? :slightly_smiling_face:

Shop here: https://shop.walhallacraftbeer.nl/

It is not a quick things that can be guided in here.

  1. You should take a look around the Theme Editor to check if the current theme already have that feature but you haven’t enabled it yet

  2. If you can code, you can check this document: https://stackoverflow.com/questions/20643484/add-to-cart-using-ajax-in-shopify

or search with this keyword: shopify ajax add to cart

  1. If you can’t code, hire a developer to do it for you. It would take about 4 - 10 hours depend on the current theme that you are using