Skip to content

Limited Ticket Discounts #59

Open
Open

Description

@G1ne

Limit Discount Code use option

Example

Discount code can only be used X amount of times.

Enables event organisers to limit the number of times a particular discount code can be used.

Activity

  1. self-assigned this
    on Jun 26, 2026
  2. dadofsambonzuki commented on Oct 6, 2026

    @dadofsambonzuki

    Implemented in #64 (draft, someone will need to merge it before you can try it).

    PromoCode now has max_uses (0 or blank = unlimited) plus a used_count, so the admin promo chip reads "Uses: 3 / 50" and the cap can be changed after the event goes live.

    Semantics worth knowing:

    • max_uses counts purchases, not tickets. One use can cover several tickets in the same basket — that's what the separate max_tickets field caps. A code limited to 10 that's used on a 4-ticket basket has 9 uses left afterwards.
    • The counter lives on the event's promo config, so the same code reused on a second event has its own counter rather than a shared one.
    • It increments when the basket is paid, not when checkout starts, so abandoned baskets don't burn a use.
    • It applies to ticket-ID offers too (upgrades, bring-a-friend), so it can cap a campaign ("first 20 upgrades").
    • 0 = unlimited, consistent with the other numeric fields.

    Two related knobs came with it: redemptions_per_ticket (how many times a single ticket ID can be reused) and max_tickets (how many tickets one redemption covers).

    Covered by tests test_scoped_code_respects_max_uses and the V9 case in test_promo_upgrade.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions