Add 2 discounts at once via Add to Cart URL

Add 2 discounts at once via Add to Cart URL

PhilLennart
Shopify Partner
33 0 23

Hey,

 

I'd like to add 2 discounts at once with a custom Add to Cart URL.

 

https://myurl.com/cart/add/41656365023415:1,41623413915831:1?discount=40VOUCHERPROGRAM&discount=50VOUCHERPROGRAM

So with this URL I would like to add 2 products at once and in addition add 2 discounts at once. When I am in the checkout, I can manually add the second one without any problems, however it should be applied automatically. How can I achieve this?

Replies 4 (4)

DhookaABQ
Visitor
1 0 1

I am trying to do the same thing: adding 2 discount codes to give a % off and free shipping. Did you figure out how to link to multiple discount codes at once?

Ma3chem
Visitor
2 0 0

Same here, did you figured it out? 😊

productchef
Shopify Partner
7 0 0

anyone got an answer ?

ri31
Shopify Partner
15 1 3

Separate the discount codes with a comma instead of an &.

https://shopify.dev/docs/apps/build/checkout/create-cart-permalinks#step-4-optional-apply-discounts

Like this: https://myurl.com/cart/add/41656365023415:1,41623413915831:1?discount=40VOUCHERPROGRAM,50VOUCHERPROGRAM