Solved

(Closed) Unified Multi-Condition Discount Code?

PavelBelsky
Tourist
7 0 1

Priviet, Shopify Community!

How do you make one discount code that changes its values, depending on the condition?

Action example:
If your cart is ≥$10 and you use the discount code: "SUMMERSALE", then apply a 10% discount to order.
But, if your cart is ≥$20 and you use discount code "SUMMERSALE", then apply a 20% discount to order.
And so on.

Code examples:
1:
   Code: SUMMERSALE
   Condition: On orders over $10
   Discount: 10%

2: 
   Code: SUMMERSALE
   Condition: On orders over $20
   Discount: 20%

3:
   Code: SUMMERSALE
   Condition: On orders over $30
   Discount: 30%

~ Pavel Belsky
Accepted Solution (1)

RobDukarski
Shopify Partner
88 15 20

This is an accepted solution.

@PavelBelsky 

You would not currently be able to do this in any feasible or reasonable way.

What you can do instead is create multiple discount codes and use some code to easily automatically apply them for the customer depending on the conditions. For example, by adding a discount code input on the cart page and when the customer inputs "SUMMERSALE" you check their order details and actually apply a "SUMMERSALE10" or "SUMMERSALE20", etc. If you are a Shopify Plus merchant you can use the Script Editor app to apply a line item discount via conditions like that which can allow or reject a discount code from being used at checkout as well.

Currently discount codes can be set up for a single amount based on various conditions, so if you want/need to use discount codes for the discounting then using multiple discount codes is how you can make the discounting work based on your conditions (with the exception of it needing to use separate discount codes).

Hope that helps!

- Rob Dukarski
Helping to make commerce better for everyone!

View solution in original post

Replies 8 (8)

RobDukarski
Shopify Partner
88 15 20

This is an accepted solution.

@PavelBelsky 

You would not currently be able to do this in any feasible or reasonable way.

What you can do instead is create multiple discount codes and use some code to easily automatically apply them for the customer depending on the conditions. For example, by adding a discount code input on the cart page and when the customer inputs "SUMMERSALE" you check their order details and actually apply a "SUMMERSALE10" or "SUMMERSALE20", etc. If you are a Shopify Plus merchant you can use the Script Editor app to apply a line item discount via conditions like that which can allow or reject a discount code from being used at checkout as well.

Currently discount codes can be set up for a single amount based on various conditions, so if you want/need to use discount codes for the discounting then using multiple discount codes is how you can make the discounting work based on your conditions (with the exception of it needing to use separate discount codes).

Hope that helps!

- Rob Dukarski
Helping to make commerce better for everyone!
PavelBelsky
Tourist
7 0 1

@RobDukarski 

That's unfortunate to hear, yes creating multiple discount codes is one solution, but having one unified code like Shein, seems so much easier for the customer. 
 shein_discounts.png
But thank you for answering my question, it is very appreciated.

~ Pavel Belsky
RobDukarski
Shopify Partner
88 15 20

@PavelBelsky 

The multiple discount code route could be automatically applied via a URL or via JavaScript which could reduce customer friction as they would not even need to input it manually unless they remove it at checkout.

If you are a Shopify Plus merchant, using the Script Editor app automatically applies the discount without needing to use any links or JavaScript.

I do see the beauty of a single discount code being able to do what you want but it's just not there yet for Shopify and probably will not be anytime soon. (After all, being able to do something like that essentially eliminates some use cases for the Plus-only Script Editor app, which could cause some Plus-based revenue to drop. Just a quick thought about it..)

If that could work for you then I can share some code you could use for it.

Hope that helps!

- Rob Dukarski
Helping to make commerce better for everyone!
PavelBelsky
Tourist
7 0 1

@RobDukarski 

You don't have to spend your time on it since it's not what I'm looking for, but I appreciate the generous offer of help.

~ Pavel Belsky
RobDukarski
Shopify Partner
88 15 20

@PavelBelsky 

You are welcome! I am happy to help!

One other thought came to mind and that is that if you are a Shopify Plus merchant and you set up a discount code for the $10 off I believe you can use the Script Editor app to detect its use and apply an additional discount based on the conditions you originally mentioned to effectively have one discount code enable a varying discount amount based on preset conditions. I believe you could do something like that because I believe I have done so in the past (based on different conditions). You may need to hide one of the discount messages though so that it does not appear like two discounts were applied.. (I faintly remember needing to do that too.)

I am unsure of limitations with that approach, such as if the total amount ends up lower than the condition for the discount code will it may reject the discount code.

If you are a Shopify Plus merchant, please try that route and let me know if it worked for you. Thanks!

- Rob Dukarski
Helping to make commerce better for everyone!
PavelBelsky
Tourist
7 0 1

@RobDukarski 

Hmm.. I see! It sounds like Shopify Plus is very extensive when it comes to advanced mechanics. Unfortunately, I am not a Shopify Plus member - as I don't have $2,000+ to spend on a monthly basis. It is definitely something I would like in the future, and it saddens me that I'm unable to get it at the moment. I would have to rely on being successful with my upcoming POD store first before I can even think about getting that upgrade. 

~ Pavel Belsky
RobDukarski
Shopify Partner
88 15 20

@PavelBelsky 

Well, there is that. Yeah as I was saying it is probably something they want to keep appealing for those that can afford to "spend big to win big" such as by being able to offer multiple different discounts per order and use Shopify Flow for automating different workflows with which high growth and high volume merchants might have the sheer numbers to easily offset the discounted amount from the use of extra discounts.

I do wish you all of the luck with your upcoming POD store!! I have one of my own that I started a while back. I have barely attempted to share it at all yet and eventually intend to swap the Debut theme it is using for the Dawn theme (with extra personal customizations of course). Frankly the bills still need to be paid so my focus shifted from it because I know it takes a significant amount of time and effort to build a successful zero-capital POD store if you do not get lucky (for example, have someone randomly help make it go viral) and that is just something I could not afford to do back then.  Not to mention the POD platform I was using I believe required payment upfront so if it did happen to go viral for whatever reason I would be screwed. I mean I cannot manage multiple social media accounts and respond to everyone that asks questions all by myself alongside everything else going on in my life haha..  Maybe I could set up fulfillment to occur after the payment is available to use.. Something I will have to look into.

Anyway, enough of that and I do wish you all the luck with your business!!

- Rob Dukarski
Helping to make commerce better for everyone!
PavelBelsky
Tourist
7 0 1

@RobDukarski 

Yeah, i've heard its definitely very time-consuming!
Regarding changing your theme from Debut to Dawn. I did the opposite yesterday because Dawn has a lot of restrictions with apps, with the POD app I'm using specifically, so I wasn't able to use some apps with Dawn. Both the POD app customer service and Shopify live chat recommended for me to change to Debut.  

~ Pavel Belsky