Quick add to cart button on collection page - Brooklyn Theme

Hi,

I want to add a quick add to cart button on my collection page, under my products. Can someone help me please? Thank you

@nlulu

hi,

Just follow the steps for Add to cart button on collection pages.

  1. From Shopify Admin select Online Store and click on Themes
  2. Choose your main theme
  3. Click the . . . on the top left-right (see below) and hit Edit code
  4. Open Snippets → product-card.liquid File and paste below code at the end of the page.

Add this code -

I don’t have a product-card.liquid file, so I tried it in the product-grid-item.liquid file and it doesn’t look too good. Is there something else i could try?

give me the store URL and remove this line of code -

bonbonslulu.ca

I removed the line of code and it looks a little better, but the button is on top.

@nlulu

Please add this code in product-grid-item.liquid between this element

add after element. see the screenshot for better understanding.

col_tyu.png

see the look after adding this code.

techlyser_ecom_0-1674376869597.png

It worked! Is there a line of code I could add to make all the buttons allign ?

@nlulu

this is the title length issue.

1 Like

Hi, I’ve added your code (thanks) and it shows the button, but it doesn’t do anyhing besides go to the product page (asif there isn’t a button at all; clicking the anywhere in this area including the product title and price will lead you to the product page too. Could you help me out?

https://d8jbz2c88vqyd3fd-7231045683.shopifypreview.com