Skip to content

How to Add a Promotion Code ​

What This Task Does ​

This task adds one or more promotion codes to an existing promotion so shoppers can redeem that campaign in cart.

Use it when the promotion already exists and now needs a usable redemption code.

Before You Start ​

Make sure:

  • the parent promotion already exists
  • you know whether you need one code or many
  • you know the usage-limit rules for the campaign

Steps ​

  1. Open the parent promotion.
  2. Go to the Codes block.
  3. Choose the code mode:
    • single for one code
    • bulk for many generated codes
  4. Enter the code or prefix.
  5. Set optional limits:
    • total usage limit
    • usage limit per customer
  6. Save the code or codes.
  7. If needed, open the code details dialog to edit limits or review redemptions.

What Happens Next ​

After this task:

  • the code is available on the promotion
  • shoppers can try to apply it in cart
  • the promotion still only works when its timing, conditions, and combinability rules are satisfied

Common Mistakes ​

  • Adding a code to an inactive or expired promotion and expecting it to work.
  • Setting usage limits too low for the campaign.
  • Forgetting that a valid code can still fail because the promotion conditions do not pass.
  • Creating duplicate code values.

Sources ​

  • packages/storefront/src/Livewire/Storefront/Cart/PromotionSection.php