New Shopify Certification now available: Liquid Storefronts for Theme Developers

Adding multiple discount codes to Shopify Checkout Link

safariroomband
Visitor
1 0 1

Is there a way to add multiple discount codes to a Shopify Checkout Link? I'm aware that you can add ONE discount to the URL via the code: 

 

 

 

&discount=

 

 

 

But I'm trying to add multiple (3 total) to multiple cart permutations on buttons on my website. It doesn't seem to be as easy as just adding that code repeatedly because it will take whatever is after the equal sign and try and put that in the code. 

 

The even more frustrating part is that I can MANUALLY add that same code above to a cart's URL once the page is open, editing the URL once it's loaded and then refreshing the page with the added &discount=  snipped, and that works. But it doesn't work to add them all at once and have the cart appear with all the products with their correct discounts applied. Only one will ever apply. 

Replies 12 (12)
Todd_French
Tourist
7 0 1

I, too, am having this issue - can't amend the permalink no matter how hard I try.  The guidelines in the shopify dev docs here - https://shopify.dev/docs/apps/channels/cart-permalinks/cart-permalinks#step-4-apply-discounts-option... - specify you just have to separate them with a comma but it doesn't work.  I tried adding the discount code again after a comma, no go, tried + but no luck

iristan
Visitor
3 0 0

Hi Todd,
The documentation needs to be updated as it is unclear.

 

Applying the following for multiple discounts worked for me:

 ?discount=FREEPRODUCT&discount=FREESHIP

Todd_French
Tourist
7 0 1

That does not work either.  I'm using a shipping and product discount, and that code doesn't work to add both to the cart, again only one will be added.  I changed it to exactly as you outlined (but with my codes, obviously)

iristan
Visitor
3 0 0

updated format should be:

?discount=FREEPRODUCT,FREESHIP

Jane175
Shopify Partner
2 0 0

Hi,
Are there any updates on this thing?
I'm looking for a way to apply multiple discount codes but getting stuck on this. Seem like it doesn't work.
I really appreciate any help you can provide.

iristan
Visitor
3 0 0

Just wondering are you trying to add multiple product discounts? or a combination of product & order?

Todd_French
Tourist
7 0 1

product and shipping - only one gets added, the other can be added manually - the frustration is that they wont' both add with the permalink

zappingseb
Shopify Partner
9 1 2

Funny thing, it sometimes works for me with "," seperation, sometimes not. I did not find out what makes it work

&discount=DISCOUNT1,DISCOUNT2

pizzaSeth
New Member
6 0 0

Just resurfacing this in hopes someone from Shopify sees it. The documentation here https://shopify.dev/docs/apps/checkout/cart-permalinks/cart-permalinks shows you should be able to, and when I manually add the codes to the checkout they are able to be combined.

ej2
New Member
4 0 0

super frustrating you can't just enable a shipping discount within a product/order discount. seems like it should be an option.

zappingseb
Shopify Partner
9 1 2

My workaround is now to use the "checkout" api endpoint and create a whole new checkout

theSerialCoder
Shopify Partner
2 0 1

Hi,

 

I don't know if this can be still useful, but I was struggling with this issue too, and I found that in order to be able to apply multiple discount codes in a Shopify Checkout Permalink you have to check the related options in the Admin page of the discount. It is possible to combine also different types of discounts.


Hope that helps.

 

Screenshot from 2023-11-16 11-53-45.png