How can I add a dynamic checkout button to each product in a featured collection?

Hello!

I’m using the studio theme, and it only seems to give me the option to add an “add to cart” button under each product in my featured collection on my homepage.

It won’t let me add a dynamic checkout button instead.

It will let me add a dynamic checkout button to a standalone featured product, but I want it added to each product in a featured collection.

Is there any way to do this? Thank you!

Hello @BunnyBear ,

Here’s a general guide for you to follow:

Go to Online Store → Themes → Actions → Edit code

Go to Sections → product.liquid file

Add the dynamic checkout button code within the product loop. It may look like this:

{% for product in collection.products %}
  
    ## {{ product.title }}
    

{{ product.price }}

    
    
    
      Buy Now
    
  

{% endfor %}

Save and preview

Hope this can help.

Transcy

Since the studio theme uses cards, card-product.liquid seems to be the place where it would go, but this code doesn’t seem to work anywhere in there.