How to add "Add To Cart" Button to each product in a Featured Collection Using Modular Theme.

Hello,

As the title states I’m searching for answers on how to add an Add to Cart button on the grid items, products, that are in the featured collection. I found other answers for this but they were all based on other themes and didn’t work. Can anyone lead me in the right direction?

I can check and suggest a solution if you share your store url.

You can also place an image or sketch of your order.

So, for example this is how the stock section functions. We want to add the buttons that will allow us to add to cart in the Featured Collection on homepage.

you have to encode several files to place the button to the cart only in that collection,

How do I do this? I’m a programmer but I’m new to Shopify programming.

look in colecction-list.liquid depending on your template, there is the product description. Then you create a button with the css classes, that button links it to the cart, of course conditioning the product ID and that’s it.

I’m very lost. As I said, this is my first time working with Shopify programming. I’m not sure how liquid works and how each of the files correlate. Is there a style sheet somewhere that I can add to? I also don’t know how to link the backend functionality to the actual button…

the style file depending on the theme, but most of it is Style.css.liquid or theme.css.liquid although to create the button use the styles of the other buttons in the template I will give you an example

Add To Order

o

Add to Cart

it depends on the template.

now in the collection-list.liquid file you will find the product code for that collection. Insert the button’s odigo somewhere and go testing. I advise you to make a copy of the template and always work on the copy.

See how you can do a validation on the underlined line of code.