Adding Only SPECIFIC Variants To a Collection

Hi Friends!

I’m looking for a way to add only specific variants of a product to a collection!

We offer our affiliates commission on certain variations of our products (We have a custom bundling feature for the other variants when people are subscribing).

Now that we have 200+ affiliates, whenever we launch a new product, I need to go in and update ALL codes to have the new product (just the one-time purchase variant)

I was hoping to use collections… so I add the variant of the product to the collection (it currently adds all variants, not just the one i want), then make the code work for just the collection (the collection is also hidden, its just for dynamically updating the codes).

Any ideas?

Also open to an app for this!

Thanks SO much!

2 Likes

Collections work on the product level so I don’t think it’s possible to add 1 variant, but here are a couple ideas:

A) You can probably modify your affiliate tracking code to filter in the variants you want to give credit for (your affiliate software provider can answer that). Or if that’s not possible, you could only load the affiliate code if the order contains one of the variants.

You can use liquid code in the Thank You page additional scripts area, so you maybe you’d do something like this:

{% assign affiliate_product = false %}

{% for item in checkout.line_items %}
  {% if item.sku == "the sku you want to track" or item.sku == "another one" %}
     {% assign affiliate_product = true %}
  {% endif %}
{% endfor %}

{% if affiliate_product %}
  - load your affiliate code here
{% endif %}

B) Another idea, create a special landing page for product launches, and single out the variant you’re promoting to affiliates.

C) You could open up referrals to any products, prob will get you some extra favor with the affiliates and extra promotion :raised_fist: