All things Shopify and commerce
Dear Shopify Developers,
When you create a discount code in Shopify Admin, you can generate a link to share this discount.
This looks something like this:
https://my-domain.com/discount/Test%2520Discount?redirect=%2Fpath
(where path is a placehodler for the path to website you wanna redirect to after the discount has been applied)
I have created 2 discounts this way.
When a customer clicks a certain button on my website, I want both discounts to be applied and the customer to be redirected to checkout.
I first tried to put the one sharable discount link on a first button. The first sharable discount link does not redirect to a new page. So it looks like this:
https://my-domain.com/discount/Test%2520Discount1?redirect=%2Fpath-to-current-site
(where path-to-current-site is a placeholder for the path to the current site)
On a second button I put the second sharable discount link, which redirects to the checkout: So it looks like this:
https://my-domain.com/discount/Test%2520Discount2?redirect=%2Fcheckout
The problem is that only the discount from the last clicked sharable discount link is applied to the products in the checkout.
Is there a way to apply two discounts at the same time with one sharable discount link? If so, what does this look like?
Thanks for your help in advance!
Solved! Go to the solution
This is an accepted solution.
Hi @Alocard
Shopify's current mechanism for sharing a discount link is when a customer clicks on the link, it will create a cookie containing the discount code. Then, when the customer proceeds to checkout, that discount code will be applied.
However, there is no Shopify Doc about how to set cookies or pass parameters into to handle, so it is not possible to interfere with the checkout section.
I hope that it's useful for you.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
This is an accepted solution.
Hi @Alocard
Shopify's current mechanism for sharing a discount link is when a customer clicks on the link, it will create a cookie containing the discount code. Then, when the customer proceeds to checkout, that discount code will be applied.
However, there is no Shopify Doc about how to set cookies or pass parameters into to handle, so it is not possible to interfere with the checkout section.
I hope that it's useful for you.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Hi @BSS-Commerce ,
that is a great pity. Then I guess I have to look for an alternative to it.
Thank you for your answer. It was very helpful!
With kind regards
Alocard
Hi there. I'm sorry for doing the annoying thing of "my app does this". But I just thought it could be valuable for people to know that we recently added this capability within ZipLinks. Check it out and let me know what you think.
Again, please excuse the plug.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025