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 |
Discount Input Placeholder | Discount Code | Placeholder text shown in the discount code input field. |
Discount Apply Button Text | Apply | 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 |
Input background color, Input text color | Default |
Button background color, Button text color | The apply button |
Success message color, Success background color | A valid code |
Error message color | 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 applies the code to the customer's Shopify cart first. If Shopify accepts it, the code shows as applied. If Shopify refuses it, Atlas looks the code up to find out why and shows the reason. These are the exact strings a customer will read, and the ones they will quote to you.
Situation | Message |
Success | No message: the code itself, such as |
Nothing entered | No message: the apply button does nothing until a code is typed |
Code not recognised | “This discount code is not valid” |
Code scheduled, expired or deactivated | “This discount code is not currently active” |
Usage limit reached | “This discount code has reached its usage limit” |
Code is active, but Shopify will not apply it to this cart, for example a minimum not met or a code that cannot combine with another discount in the cart | “This code can't be applied to your cart” |
Lookup failed | “Unable to validate discount code. Please try again.” |
The cart could not be updated | “Failed to apply discount code. Please try again.” |
Code removed with the × beside it | “Discount code removed” |
The code could not be removed | “Failed to remove discount code. Please try again.” |
ℹ️ These are specific for a reason. A customer told a code "has reached its usage limit" 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.

