Automatic Discount Application for direct checkout

Topic summary

A merchant is experiencing issues with discount codes not automatically applying when customers are redirected to checkout using a form submission method. The code previously worked but has stopped functioning, despite no changes to discount settings.

Key Technical Details:

  • The implementation uses a hidden form with fields for variant ID, selling plan ID, discount code, and quantity
  • The form submits via POST to ‘/cart’ with a checkout button

Community Responses:

  • One user suggested a JavaScript solution for calculating percentage-based discounts on cart totals, though this addresses cart-level discounts rather than checkout application
  • Multiple users confirmed experiencing the same problem, indicating a potential platform-wide issue
  • One user reported the code works on Dawn theme version 11.0

Important Limitations:

  • Only one discount code can be passed to checkout through the input field
  • Multiple discount codes require Shopify Plus with checkout scripts (deprecated August 2024) or Shopify Functions

Status: The issue remains unresolved, with no definitive explanation for why previously working code has stopped functioning.

Summarized with AI on November 17. AI used: claude-sonnet-4-5-20250929.

works on dawn 11.0

however only one discount is handed over to checkout. Is there an accepted syntax to pass multiple codes within the input type?