Promotion Codes
What This Is
Promotion Codes are the shopper-facing keys that activate a promotion in cart. They belong to a promotion and define the usage limits for that redemption path.
When You Would Use It
Use Promotion Codes when you need to:
- create a public or private code for a promotion
- generate many codes at once for a campaign
- limit how many times a code can be used
- control how many times each customer can use that code
Do not use a code when the underlying promotion itself is not ready. A code cannot fix a misconfigured promotion.
Before You Start
Before you create or edit a code, make sure:
- the parent promotion already exists
- you know whether you need one code or a bulk-generated set
- you know the usage rules for the campaign
How To Use It In The Admin
- Open the parent promotion.
- Go to the Codes block.
- Choose whether you want:
- a single code
- a bulk code set with a prefix
- Enter the code or prefix.
- Set optional limits:
- total usage limit
- usage limit per customer
- Save the code or codes.
- Use the code details dialog later if you need to edit limits or review redemptions.
What It Changes In The Storefront
Promotion Codes affect:
- whether a shopper can apply a discount in cart
- whether the discount succeeds or is rejected
- the redemption history attached to that promotion
Common Tasks
Create a single code
Use this for one named campaign code such as SUMMER20.
Generate codes in bulk
Use prefix mode when you need many unique codes from one promotion.
Update a code
Use the code details dialog to change the code or its limits.
Review redemptions
Use the code details dialog to inspect how the code has been used.
Import or export codes
Use the promotions Excel workbook when you need bulk review or maintenance.
Rules, Limits, And Things To Watch
- Codes must be unique.
- A valid code can still fail if the parent promotion is inactive, expired, not combinable, or not eligible for the current order.
- Per-customer limits are evaluated against the customer account's user set, not just one user login.
Troubleshooting
The code exists, but it does not apply
Check the parent promotion first: active state, date range, conditions, shipping cutoff, and combinability.
The code was used once and now fails
Check whether the global or per-customer usage limit has been reached.
I need many codes quickly
Use bulk mode with a prefix instead of creating each code manually.
Related Features
Sources
packages/admin/src/Livewire/Admin/Settings/Promotion/Codes/CreateDialog.phppackages/admin/src/Livewire/Admin/Settings/Promotion/Codes/DetailsDialog.phppackages/admin/src/Livewire/Admin/Settings/Promotion/Codes/Block.phppackages/framework/src/Services/Promotion/PromotionCodeService.phppackages/framework/src/Models/PromotionCode.phppackages/framework/src/Imports/Promotions/PromotionCodesSheetImport.phppackages/storefront/src/Livewire/Storefront/Cart/PromotionSection.php