Add to Cart Button - Change colour depending on product

Hi all,

Was wondering if I could get some help with customising my store. Basically, I have all my products (of which there are 10) assigned to the ‘Default Product’ template in my Theme (Taste). I want to change the ‘Add to Cart’ button’s color to match the colour of each product individually and I’m not sure how to approach this.

Could somebody please point me in the right direction? Should I use meta-fields or rather split each product into it’s own individual theme template and take it from there?

Any help would be much appreciated.

In case it’s helpful, the URL is https://lacelabs.co.uk

You can create different product template for different button color and then assign the product template to its respective prodcuct

Hey @bskill ,

Go to your theme’s “Edit Code” Option, then in the search bar type “theme.liquid”
Below the tag “” tag paste the following. Screenshot attached for reference.

Make copies of this code and change the link between href=“{link}” and change the background-color setting to whatever colour you like.


Screenshot is for reference only, the correct code to paste is the one shown above.