Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello, is there a url structure/permalink which supports adding a product to the cart with a discount code and redirects the user?
For instance:
this applies a discount and redirects to the specified page
http://site.com/discount/codegoeshere/?redirect=/collections/all
This adds an item and applies a discount but sends me directly to checkout. I'd like to redirect to another page on the site. Is this possible with this method?
http://site.com/cart/1234567:1?discount=codegoeshere
This adds an item and sends the user to the cart page.
http://site.com/cart/add?id=1234567&quantity=1
My end goal is to Add a product to the cart. Apply a discount and redirect the user. Can you point me in the right direction? thanks
Hello, @ex-homedepot.
Elias here with Shopify Support. Thank you for reaching out and this is a great question!
There isn't a URL structure that supports this natively but there is a third-party app with the ability to create pre-filled cart links with discounts attached, called Automatic Discount. While going directly to checkout might not be possible, it’s possible to send them to the product pages or cart page. Automatic Discount app offers a 7 day free trial for you to try out. If you require assistance with this app, you can reach out to the developer directly through the contact information found in the Support section of the app’s page.
Let me know if this helps! If you have any further questions regarding this topic, feel free to reply to this thread and I’d be happy to help.
Elias | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Sorry just this solution dont work.
Can you please post real example here?