Activating cart drawer for products without redirect to cart page

13 0 0

Hi ya, 


Im needing to have my cart drawer updated every time a customer adds a product from the featured collection without having to be redirected to product page or cart page. 


I have used this code in the product.card liquid

<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ }}" />
<input min="1" type="number" id="quantity" name="quantity" value="1"/>
<input type="button" value="Add to cart" class="btn" />


but every time the quantity is updated or the add to cart button is submitted it redirects me to the product page. 


Is there a way where the cart drawer can update and slide out when this is done?