How to create variant quantity based discounts in Shopify

I’m trying to set up a discount system that works with product variants in my Shopify store. Here’s what I want to achieve:

  • I have products with multiple variants (like different sizes or colors)
  • When customers add 3 or more variants of the same product to their cart, they should get a discount
  • The discount should increase based on how many variants they buy: 3 variants = 5% off, 4 variants = 10% off, 5+ variants = 15% off

Is there a way to implement this kind of variant-based discount system in Shopify? I’ve looked at the built-in discount options but can’t figure out how to make it work with variant quantities rather than just total product quantity. Any suggestions or apps that could help with this would be great.

The native discount functionality in Shopify does not support tiered discounts based on variant quantities, as it considers each variant as a separate product. However, if you have a Shopify Plus subscription, you can utilize the Script Editor to write a custom script that counts the variants from the same parent product and applies the appropriate discounts based on quantity. For stores not on Plus, consider using the Bold Discounts app, which allows for more flexibility in setting up variant-based discounts, though it may require careful configuration. Alternatively, you could explore implementing custom JavaScript for calculating discounts directly in the cart, but this can become complicated due to discount code validation issues.