Applying multiple discount codes in cart

JesperM
Shopify Partner
7 0 1

With the introduction of stackable discount codes, I have a client who want their VIP customers to automatically have applied multiple discounts to their cart before checkout.

 

Sadly it looks like you can't use the shareable discount URL, as it replaces the existing discount code with the new one:

https://storename.myshopify.com/discount/discountcode1?redirect=/cart

https://storename.myshopify.com/discount/discountcode2?redirect=/cart

 

The above will result in dicsountcode2 to be applied and discountcode1 to be removed.

 

Then I tried adding the following lines to the form on the cart page:

 

 

<input type="text" name="discount" value="discountcode1" >
<input type="text" name="discount" value="discountcode2" >

 

 

This of course only adds the last discount code to the checkout, so I also tried doing it as an array, but this does not work at all:

 

 

<input type="text" name="discount[]" value="discountcode1" >
<input type="text" name="discount[]" value="discountcode2" >

 

 

Am I missing something here? I searched all the documentation on the topic, but can't seem to find a solution to add multiple discounts using the native was in Shopify.

 

Anyone have had any luck with this?

Replies 8 (8)

George_Greenhil
Trailblazer
175 0 57

Hey @JesperM,

 

I can't really help with this but was just wondering when the stackable discount code feature went live for you in your store(s)?

 

I cant see it in my admin still atm...

 

Thanks,

George

JesperM
Shopify Partner
7 0 1

Hey @George_Greenhil 

 

It went live a couple of days ago on the shops I manage. 🙂

 

Best,

Jesper

George_Greenhil
Trailblazer
175 0 57

@JesperM 

 

Thanks for letting me know, I'm in the UK which is normally a little behind other areas so hopefully it will be live soon here as well! 🙂

DEV-ONI
Shopify Partner
5 0 0

We can't seem to even be able to apply a single discount code on the page?
Does this actually still work in 2022?



<input type="text" name="discount" value="discountcode1" >

 

JesperM
Shopify Partner
7 0 1

It should still work, did you place it inside the form tag on the cart page it self?

GoodDogOz
Shopify Partner
2 0 1

Hi @JesperM 

 

Did you ever figure out a solution for the above?

JesperM
Shopify Partner
7 0 1

Sadly not @GoodDogOz  😕

GoodDogOz
Shopify Partner
2 0 1

Thanks Jesper!  I suspected as much after we spent a bit of time trying to figure out a workaround.  Disappointing but we will look to bring in another app to do what wea re trying to do here (eg) provide tagged users with both a product discount and free shipping automatically.