Apply Discount Code only to Variant in Collection

Apply Discount Code only to Variant in Collection

Shopify Partner
25 1 5

Is there any way to apply a discount code to only one variant of a product?


In reality, I would prefer to create a collection that only includes the one variant.



Product A has two variants — (1) Physical CD and (2) Streaming, and it part of a collection called "My Products"


I would like the discount code, Discount50%, to apply only to the Physical CD variant.


Ultimately, I would prefer to have a collection called "My Physical Products", but the whole product is added if one of the variants matches the criteria.


One thought is to line item scripts, but I prefer avoiding them as much as I can

Replies 3 (3)

Shopify Partner
3879 839 973

Hi @charles_loder 

Thank you for your question.


You could create a discount code for a specific variant by doing these steps below:

  1. From your Shopify admin, go to Discounts.

  2. Click Create discount, and then click Discount code.

  3. In the Discount code section, do either of the following:

    • Enter a name for the new discount code, for example, 50offPhysicalCD.
    • Click Generate code.
  4. In the Types section, do either of the following, select Percentage and then enter a percent value in the Value section.

  5. In the Applies To section, select Specific products, click Browse, check the appropriate variants, and then click Add.

  6. Check the suitable solution at Minimum requirementsCustomer eligibilityUsage limits, and Active dates section.
  7. Click Save discount code.

If you feel like this answer is helpful, please mark it as a SOLUTION.

Best regards.

4 0 1

What if you have 800+ products each with 4-5 variants? I'm trying to do this as well, I want to discount my1 variant, tis will take so long and then i have to change it back when the promo is over. Is there any other way to do this?

4 0 1

I'm also looking for a solution to this.. I cant offer the same discount to every product variant. I only want to offer it for 1 variant and my products all have the same 4. It's very frustrating, I cant browse all 1500 products and do this each time i want to offer a sale or discount. I cant believe it's this hard to do.