PrestaShop single-use discount codes: a series of unique codes for your newsletter

Single-use discount codes in PrestaShop are a series of cart rules with the same conditions, each of which works only once. Every newsletter subscriber gets their own code, so a code copied onto a coupon forum won't work for a hundred strangers. In the admin you create them one by one; for a bigger series a module or the chat helps.

Author: The TellMyShop team. A guide for PrestaShop store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 5 min read

A shared code or single-use codes?

One shared code is quick and is enough when the discount is open to everyone. You choose single-use codes when the discount should reach only specific people.

Type of codeHow it worksWhen it fitsRisk
Shared, no limitanyone can enter it any number of timesopen campaign, advertisingthe code quickly ends up on coupon sites
Shared, once per customereach customer oncenewsletter with a small discounta new account and the code works again
Single-use, uniqueone code, one use in the whole storenewsletter, apology, competition prizeyou have to assign codes to subscribers
Assigned to a customerworks only in that person's accountregular customer, complaintthe customer has to be logged in

The settings of a single cart rule, including the usage limit and assignment to a customer, are described in the PrestaShop documentation chapter on Cart Rules. Developers will find the list of rule fields (code, dates, number of uses, minimum amount) in the description of the cart_rules resource.

A single-use code won't stop every kind of misuse. A subscriber can pass their code to a friend, and that is fine, because the code still works only once. It protects you from something else: one newsletter code landing on a coupon site and cutting prices for a week for everyone who finds it. When the discount is high and the list is large, that difference can be felt in your margin.

What conditions should a series of codes have?

The conditions have to be the same across the whole series, because only then can you describe them in one sentence in the newsletter. Before you create anything, write them down:

  1. Discount value. A percentage or an amount. For an amount, state whether it includes tax.
  2. Minimum basket value. The amount from which the code works.
  3. Dates. Start on the sending day, end after a few days or a week. A code with no end date stays in the store for ever.
  4. Number of uses. One use per code. That is what makes a code single-use.
  5. Prefix. A shared start to the code, for example NEWS-, so you can find the series in the list later.
  6. Exclusions. Whether the code works on sale products and whether it combines with other codes.
  7. Number of codes. As many as you have subscribers, with a small margin for new sign-ups.

When a subscriber reports that the code doesn't work, one of these conditions is usually to blame: the minimum basket, the date or the exclusion of sale products. We cover this in detail in the piece on why a discount code isn't working.

How to connect the codes with your newsletter

The store creates the codes, and the newsletter tool hands them out to subscribers. Email tools usually let you insert a code from a prepared list into a message, or create codes with a prefix themselves, as described for example in Klaviyo's help. Before you create a series, check in your tool:

  • whether it accepts a list of ready codes, and in what file,
  • whether each code goes to only one person,
  • what happens when the codes run out.

When the tool creates codes itself, they still have to reach PrestaShop as cart rules. Otherwise the customer enters the code and the store doesn't recognise it.

By hand or in a series?

For a few codes the admin is enough: Catalog → Discounts, new cart rule, code, conditions, save, and the same for every code. With several hundred subscribers that means many evenings copying the same settings, and every mistake in one rule is a customer whose code doesn't work.

Wednesday, 8:15. Instead of creating rules one after another, you write one request and read a preview of the whole series.

How to create a series of codes with the chat

With the TellMyShop module you describe the conditions in plain words. Your chat (Claude or ChatGPT) checks whether codes with that prefix already exist, shows a preview of the conditions and the number of codes, and after your “yes” creates a series of unique single-use codes. All codes in the series have the same conditions. New codes are disabled until you agree to enable them. The values in the example are samples.

You: I need 320 single-use codes for Thursday's newsletter. 15% off, basket from €150, valid Thursday to Sunday, not on sale items.

Your chat: There are no codes with the prefix NEWS1015 in the list of rules. Preview of the series:

You: Yes, create them.

Your chat: I've created 320 codes, they are disabled. The list of codes is in the summary, ready to move to your newsletter tool. Shall I enable them now or on Thursday morning?

You: Enable them now, they only work from Thursday anyway.

Your chat: Preview: 320 codes will change status from disabled to enabled. Save?

Card status: waiting for your “yes”
change preview

new version: Codes: 320, prefix NEWS1015-, each single-use

new version: Discount: 15% on the order, excluding sale products

new version: Minimum basket: €150.00 incl. tax

new version: Valid: 2026-10-15 to 2026-10-18

new version: Status: disabled until you approve

Illustration: products, numbers and replies are examples.

A similar request, for one shared code, is in the use case a discount code for the newsletter. After the campaign the chat will show how many codes from the series were used, disable the rest and delete the ones nobody used. It doesn't delete codes used in orders, it only disables them.

Codes, prices and promotions belong to the Sales area. In TellMyShop Pro it works after you turn on the Sales switch in the module panel, and stays on until you turn it off. Every series goes into the change history, and you can undo most changes with one request. The chat doesn't send the newsletter or anything else to customers: your tool does the sending.

TellMyShop Free only reads the store and saves nothing. Plans are on the pricing page. If the codes are meant to support a bigger campaign, see the Black Friday plan.

Questions and answers

How does a single-use code differ from a code limited to one use per customer?

A code with a per-customer limit is one shared code that each customer can use once. Anyone who sees it can type it in, including on a coupon forum. A single-use code works only once in the whole store, so every newsletter subscriber gets their own.

Does PrestaShop generate a series of codes by itself?

In a cart rule, the Generate button creates one random code. A series of unique codes with the same conditions needs either many cart rules created by hand, a module, or a tool that creates them for you.

How do I pass the unique codes to my newsletter tool?

Most email tools let you assign a code from a list to each subscriber, but how depends on the tool. Check whether yours accepts a list of ready codes. TellMyShop doesn't send messages to customers, so sending stays with your tool.

What should I do with codes nobody used?

After the end date a code stops working by itself. When you want to tidy the list of cart rules, you can delete unused codes, while used ones you can only disable, because they are linked to orders.

Will TellMyShop Free create discount codes?

No. TellMyShop Free saves nothing. Codes are created by TellMyShop Pro after you turn on the Sales switch in the module panel, each series with a preview and your approval.

PrestaShop is a registered trademark of PrestaShop SA. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.

The English version launches in January 2027

Join the list and you'll hear first when it opens, with a 72-hour head start on the launch offer.

A few emails before launch. Unsubscribe in one click. Privacy policy

Read next