Adding an "Add to Cart" Button to Collection Pages in Debut Theme

New Member
7 0 0

 

 


@Amanie wrote:

Hello there !

 

This was helpful to me too, thanks ! but how can i stop it from redirecting to the cart page once the customer presses " add to cart", since the whole point of creating the selector outside the item card is to avoid the back & forth.. 

 


If you haven't found a solution yet, move the code to outside of the last div (the original instructions we were all following have it inside the div)

 

 

0 Likes
Highlighted
Excursionist
27 2 0

I created a Shopify Buy Button from Settings / Sales Channels for my two products.  Then I added a Custom Content section, deleted the two default sections, then added a new section for HTML.  I pasted the Buy Button code in the HTML section.  It works like a charm on desktop and mobile.

0 Likes
New Member
3 0 0

Hi there 

So this is working Great , 

jus 1 more thing to this, 

How to change it So  after i Do add to the Cart    To stay on the same page and not Jump to the Cart,?

 

Thanx A lot!

0 Likes
New Member
3 0 0

hi Brydon, 

 

i'm trying to add the below code to the product-grid AND the search result page too, but i cant find them in snippets in symmetry theme.

 

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

 

please advise.

0 Likes
New Member
1 0 0

same here... did you find the solution ?

I tried the solution to add the button on the colleciton page + ajaxify, but it still leads me to the cart page...

Thx,

 

0 Likes
New Member
2 0 0

This looks good on desktop but the Add To Cart button is oversized on my mobile page (See photo attached).How can I change the size of the button while keeping everything as is on desktop?WechatIMG334.jpeg

0 Likes