Happening now! Shopify Community AMA: Building a Marketing Budget with 2H Media | Ask your marketing budget questions now!

Custom Code For Discount Stacking

Custom Code For Discount Stacking

MadAboutDrip
Visitor
1 0 0

I have 5 discounts - FIRST05 (First-time customer orders get a 5% discount), NEW05 (First-time customer subscription gets a 5% discount), SHOP10 (10% discount over orders let's say 10$), SHOP15 (15% discount over orders worth 20$) and SHOP20 (20% discount over orders 30$). 

 

I want to set custom rules via custom code to enable the following discount stacking :

1. FIRST05+NEW05 (For orders below 10$) 

2. FIRST05+NEW05+SHOP10 (For orders above 10$)

3. FIRST05+NEW05+SHOP15  (For orders above 20$)

4. FIRST05+NEW05+SHOP20 (For orders above 30$)

Note - FIRST05 is for First-time customer orders get a 5% discount and NEW05 is for First-time customer subscriptions get a 5% discount)

 

Current Issue:

1. If order combinations are enabled for all of them, then SHOP10, SHOP15, and SHOP20 also get combined, which beats the discount point.SHOP10, SHOP15, and SHOP20 discounts should be set in such a way that based on the order amount, the best discount code is applied automatically but combinable with NEW05 & FIRST05.

2. FIRST05 and NEW05 are customer segment applicable discount codes so cannot be automatically applied at the checkout when eligibility criteria are met!

 

If a custom code can be written for resolving these two issues (with priority given to the first issue mainly), it would be highly appreciated!

Replies 0 (0)