How to display list of discount codes at cart page

Topic summary

A Shopify store owner wants to dynamically display active discount codes on the cart page, automatically updating when new codes are created, rather than manually listing them.

Technical Challenge:

  • Dynamic discount code display requires multiple API access scopes and cannot be implemented directly through standard theme customization
  • Static lists can be added via theme sections (Online Store > Themes > Customize > Cart), but this doesn’t meet the dynamic requirement

Proposed Solutions:

  1. Shopify Apps - Several apps were recommended:

    • Discount on Cart Pro
    • Available Discount Coupon List on Cart Page
    • Discount Coupon Field in Cart Page
    • Discount Before Checkout (identified as top performer)
    • Discount in Cart (runner-up option)
  2. Custom Coding - Mentioned as an alternative, though no specific code examples were provided in the thread

Key Findings:
One user tested multiple apps and found issues with stacking discounts and free shipping compatibility. A detailed review and 2025 AI-assisted research both concluded that “Discount Before Checkout” is the most reliable solution.

Status: The original poster’s question about coding references remains unanswered; the discussion primarily points toward app-based solutions.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

Hello,

I am trying to add/ display a list of discount codes currently active on my site on the cart page. So that users can easily copy that code and paste it on the checkout page. However, I am not getting any handy documents that can be used to achieve this functionality.

Any quick help would be grateful.

Hi @savita_nagdev

Dan here from Ryviu: Product Reviews & QA

If your theme supports adding sections to the cart page, add a section and list all discount codes of your store in that section.

You can do that from Online Store > Themes > Customize > click dropdown menu at the top > Cart

I want to display a dynamic list of discount codes, not a static one. As soon as I create a new discount code it will automatically display in the list.

1 Like

You cannot display a dynamic discount code directly because it requires multiple access scopes. I guess you must to use an app or create your own function.

Hello @savita_nagdev ,

The discount code (dynamic discount code) on cart page can be displayed in two ways - By custom coding or using Shopify App.

Please go through the below mentioned shopify app link, it will assist you in displaying discount code in cart page.

I hope the app helps you.

Thank you.

1 Like

Hi @Anshul_arora ,

Thanks for the app suggestion. But I preferred it to do via coding. Is there any reference code you have that I can use?

Hi!

Did you ever find a solution for this?

I tested all the mentioned apps but they all had issues with stacking discounts and free shipping discounts. I was surprised how long it took me to find a working app for this, so I decided to write a detailed review about the discount apps I tested: https://appreviewhq.com/shopify-discount-app-review-2024. TLDR: the clear winner was https://apps.shopify.com/discount-before-checkout, with https://apps.shopify.com/discount-in-cart in cart as the runner-up.

1 Like

Following up on this - I was curious how the landscape looked 2025 and with all the AI tools around I decided to ask Perplexity to do a Deep Research on the topic. It came to the same conclusion as me last year: https://www.perplexity.ai/page/how-to-add-a-discount-code-inp-U2geoi.YR8qr5H5eM59c4Q