I don't want to be redirected to the cart page when I add a product from the collection page

New Member
1 0 0


I'm using the debut theme.

I added the following code to the snippet product-card-grid.liquid:

<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />
<input min="1" type="number" id="quantity" name="quantity" value="1"/>
<input type="submit" value="add to cart" class="btn" />

it works but when I click on the add to cart button, I'm redirected to the cart page. I don't want to be redirected.

Thanks for your help.