How to insert discount code into URL so discount is auto-applied to all prices

Topic summary

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.

Go to DISCOUNTS → Select active discount → upper right corner you will see “Promote” and Get Shareable link…

1 Like