I have a large number of 30K products in my store and I have some volume discounts on them.
E.g. Buy (% off)
1-2: Normal price
3-5: 4%
6-10: 6%
11+: 10%
The products are set up with 2 tags. One to identify if the product qualifies for volume discounts, another to specify the tiers. For the above example, this will look like this:
Tags: “volume-discounts”, “vdo|3:4|6:6|11:10”
The tags dont contain the normal price since theyre in the product anyway.
I then do some string split etc to work out the discount percent to apply. The shopify script has been running really well. However, now when Im trying to port this over to a shopify function, I cant see a way to get the product tags. I can filter by productvariant with hasAnyTag: volume-discounts. But how do I access the product tags?
I looked through some posts which talk about input variables and metafields but couldnt quite put it together. I would really appreciate some help here getting access to the tags in my function. Thanks so much!