Adding product tags for variants

Hi Team,

I have a site with size variants and am wanting to add and remove tags for the variants -

Add the tag when the size variant is greater than 1 and then remove it when the size variant is 0 (sold out).

Is this do-able?

Hello,
You can’t tag a variant. You can only tag a product in Shopify. But you can tag a product if they have more than one variant and if they get sold out remove that tag. Might want to check out Shopify Flow app that shopify made so you can automate this.

What are you trying to achieve with the tags? You should be able to tell if a product is sold out by looking at the inventory quantity, rather than the tags anyway (in liquid, or graphQL, JSON etc).

Hi

I know you cannot tag the variant - I was wanting to tag the product if the variant was there (greater than 1) and then remove the tag if the variant was not there (less than 1) - hope that cleared it up

I was wanting to tag the product if the variant was there (greater than 1) and then remove the tag if the variant was not there (less than 1) - hope that cleared it up

Apologies if I was unclear. I understand what you’re trying to do. But I’m unsure what the end goal is - what problem would these tags solve for you? I’m just wondering if there’s a better solution than to use tags here.

When filtering products - so people (customers) can search by size and/or I can build dynamic collections based on whats available in that size

Hope that helps