Skip to main content
Checkout & payments

Let shoppers enter discount codes in the cart

The Discount code block lets shoppers try a code before reaching checkout and see which discounts are already applied.

Set up the block

  1. Edit your cart and turn on Cart > Discount code.
  2. Keep Show the code entry field on if shoppers should type codes here.
  3. Enable Show a chip per discount to display individual applied discounts.
  4. Optionally enable Make it collapsible and choose its default state.
  5. Edit the labels as needed and save.

For a store using only automatic discounts, you can hide the entry field while keeping applied discounts visible. Collapsing the field does not hide the applied discount chips.

Codes and automatic discounts

Entering a code asks Shopify to apply an existing discount. This field does not create new codes. Shopify decides whether the code is valid for the products, customer, dates, and other discounts in the cart.

Code chips can be removed by the shopper. Automatic discounts do not get the same removal control because they are applied by the store's discount rules.

Test on the storefront

The editor preview does not apply real codes. Save, open your storefront, add a qualifying product, and test a known valid code. Check the total again at checkout.

If a code is rejected, check its requirements and Shopify's discount-combination settings. Cart reward discounts are configured separately under Rewards bar.

Was this article helpful?

Your feedback helps us improve our docs.

Thanks - we'll keep improving this article.

Want to chat with our team? Still have a question?

Still need help?

Our team is one click away. Send us a message and we'll get back to you.

We use a few cookies to keep this site working, measure how it is used, and power our chat widget when you open it. See our cookie policy.