The discussion centers on automatically applying discount codes via URL and displaying discounted prices throughout a Shopify store, not just at checkout.
Basic URL Method:
Standard approach: https://{shop_name}.myshopify.com/discount/{discount_code}
Can add redirects: ?redirect=/products/{product} to land on specific pages
Shareable links available in Shopify admin under Discounts > Promote
Key Limitations Identified:
Discount codes apply at checkout only, not during browsing
Cookies get cleared when using redirects, causing mobile/private browsing failures
No native Liquid/API method to display discounted prices on product pages
Cart page cannot accurately show applied discounts
Invalid codes are accepted in URLs but fail silently at checkout
Workarounds Discussed:
Custom JavaScript solutions to auto-apply codes (shared by HenryReith)
Manual cookie management for Plus customers
Third-party apps like Adsgun that display savings across all pages
Multiple discount codes now supported via cart permalinks (recent Shopify update)
Current Status:
The core request (showing discounted prices while browsing) remains unsolved natively
Community frustration noted over Shopify’s years-long lack of comprehensive solution
Various workarounds exist but require custom development or apps
Summarized with AI on November 2.
AI used: claude-sonnet-4-5-20250929.
Have you all figured out yet that this is all broken?
If you use the direct URL entry method, it happily accepts bogus coupon codes
It saves said bogus coupon in the cookie, fooling you into thinking it’s valid
If you proceed to checkout, coupon is not there, because it was bogus
If you enter a different code a checkout, it will use it, but it doesn’t update the cookie
If you enter a valid code that isn’t valid for the products, you get an error, but it remembers. Add a product that IS valid, suddenly you have the discount.
Cart and ALL other pages have NO way to know accurately what coupons are applied and how much discount they give. NONE. PERIOD.
Shopify made a HUGE mistake in how they implemented this, but there are threads going back over 6 years that suggest to me that they will pay lip service to the need but have NO interest in fixing it. Shameful, Shopify, shameful!
If this is still a challenge, this free app could be a possible solution.
Automatic Discount Code Links applies storefront discounts. On top of this, it allows to generate discount codes that are auto-applied when a customer goes to your store using a specific link or manually applies a promo code on a product page.
All of these answers miss the key point the OP asked, which is to display the reduced price on all pages while browsing this site. We just launched our Shopify store this week and that was a major downside for us. I ended up creating some custom logic on the checkout page (we’re Plus customers) and managed cookies myself. This was all in an effort to get a coupon box and message on the cart page, nevermind every other page. It works pretty well, though there are situations were it can get out of sync. We’d love to show the savings on every product page, and we may look into that, but only if the logic is reliable in the long term, which we don’t know yet.
The real problem is that Shopify has a complete disconnect between Checkout and every other page on the site, even including Cart. And for some strange reason, they did not implement coupon functionality in a way that customers want. People wanna see savings quickly and easily, and having to get all the way to checkout just to see it is terrible UX, but they just don’t seem to understand that. It’s been YEARS of this problem and they only pay lip service to addressing it
I’m curious. Now order discounts can be combined with shipping discounts, is there a stackable URL we can promote to auto apply at checkout for both codes
I have been searching around today to work out how to do this easily, without apps, and came up with just a few lines of JS that will do it. I’ve shared the JS here: https://henryreith.co/automatically-add-discount-codes-to-shopify-checkout/. Hope this help’s other people looking for a solution too.
Yes, you can deep link to a page while applying a discount e.g. https://{shop_name}.myshopify.com/discount/{discount_code}?redirect=/pages/page-url . This would make the user land on yourdomain.com/pages.page-url.
Or if you question how can you add a discount when someone visits a specific URL?