The discount codes module adds a field to the cart drawer where customers can enter a code and see immediately whether it worked. By the end of this it will be enabled and styled. The codes themselves are created in Shopify: Atlas provides the field and validates what customers type.
In this article:
Step 1: Enable it
In the cart drawer editor, select
Discount Codes.Select
Activate.
Until then: "Discount codes are not shown because they are disabled. Activate to show them in your cart. You can review changes before saving."
Step 2: Set the labels
Field | Default | Help text |
|
| Placeholder text shown in the discount code input field. |
|
| Text displayed on the apply discount button. |
The defaults are fine. Change them only if your store uses different language for codes, such as "voucher" or "promo code".
Step 3: Style the states
The field has three visual states, each with its own colours.
Control | State |
| Default |
| The apply button |
| A valid code |
| An invalid code |
Preview each with the Previewing control, which offers No discount, Valid code and Invalid code.
💡 Check the invalid state carefully. It is the one customers actually encounter, since typos and expired codes are far more common than perfect entries, and an error message in low-contrast red on a coloured background is unreadable exactly when it matters.
The messages customers see
Atlas validates the code against Shopify and returns a specific message. These are the exact strings a customer will read, and the ones they will quote to you.
Situation | Message |
Success |
|
Nothing entered |
|
Code not recognised |
|
Code disabled |
|
Start date in the future |
|
Past its end date |
|
Usage limit reached |
|
Lookup failed |
|
ℹ️ These are specific for a reason. A customer told a code "has expired" understands the situation, whereas one told it "is not valid" assumes they typed it wrong and tries again. When a customer contacts you about a code, ask which message they saw.
Whether to enable it at all
Worth thinking about rather than switching on by default.
Enable it when you actively issue codes: email campaigns, influencer partnerships, recovery offers, customer service goodwill.
Consider leaving it off when you do not. An empty discount code field prompts customers to go and look for one, and many will leave your cart to search for a code that does not exist. Some of them will not come back.
⚠️ A visible discount code field on a store that never issues codes measurably increases cart abandonment. If your promotions are automatic discounts rather than codes, this module is costing you more than it earns.
Codes are created in Shopify
Atlas provides the field and validates entries. The codes themselves are created in your Shopify admin under Discounts, with the discount method set to Discount code.
This is separate from the automatic discounts behind your reward progress bar, which customers never type. See Creating the discounts behind your reward bar and Shopify's documentation on discount codes.

