Skip to content

v2.0.0: ticket types, basket checkout, promo codes, fiat, deactivation#64

Draft
dadofsambonzuki wants to merge 66 commits into
lnbits:mainfrom
dadofsambonzuki:main
Draft

v2.0.0: ticket types, basket checkout, promo codes, fiat, deactivation#64
dadofsambonzuki wants to merge 66 commits into
lnbits:mainfrom
dadofsambonzuki:main

Conversation

@dadofsambonzuki

Copy link
Copy Markdown

Summary

Major rewrite: multi-ticket basket checkout, ticket types, promo codes, event-level payment methods, fiat via core providers, ticket deactivation.

Changes

  • Ticket types — multiple ticket tiers with pricing, availability windows, max limits
  • Multi-ticket basket checkout — buy multiple tickets of different types in one transaction
  • Promo codes — percentage or fixed discounts, add/edit via inline chip UI, deactivated codes shown with strikethrough
  • Payment methods per event — LN, onchain, fiat checkboxes with per-method wallet selection; checkout retries with remaining methods if one fails
  • Fiat via core — fiat provider credentials from LNbits core settings, authorized per user
  • Satspay charge ID linked to tickets — hyperlinked column in admin tickets table
  • Ticket deactivation — toggle in admin table, deactivated badge on public page, rejected at registration
  • Bulk email — resend all tickets, custom message to attendees, with confirmation dialog
  • Admin email — per-event admin notification email for ticket sales
  • Simplified basket — single email + optional name at basket level; batched email per buyer
  • QR/button layout fixes — aligned save/cancel/delete buttons across dialogs, field alignment fixes
  • Migration cleanup — removed unnecessary interim m010 (currency columns never created)

See individual commits for detailed changes.

…y payments, admin email, bulk actions, and i18n
- Each promo code in a standard q-card matching rest of UI
- Header row with bold code name, active/inactive badge, red delete button
- Active and combinable as proper q-toggles with labels (not hidden checkbox)
- Max uses hint shortened to avoid spilling
- Discount type toggle with spread, descriptive labels, no-caps
- Add button with outline and icon
- Removed allow_fiat field from TicketType model
- Removed auto-sync of allow_fiat from ticket types to event
- Removed allow_fiat toggle from ticket type dialog UI
- Removed unused i18n keys (allow_fiat_checkout, allow_fiat_hint,
  wave_allow_fiat_hint, fiat_checkout_currency)
- Event-level allow_fiat retained as legacy fallback
- Both use row q-gutter-sm with col-auto for multi-per-line wrapping
- Same chip styling (q-py-xs, height: auto, white-space: normal)
- Removed refresh button from ticket types and its i18n key
…tspay

- EventExtra model now includes fiat_provider field
- Admin UI shows fiat provider dropdown populated from g.user.fiat_providers
- services.py passes fiat_provider from basket to satspay charge creation
- display.js reads fiat_provider from event extra
- Updated i18n hints to reference core server settings
- Add deactivated field to TicketExtra model (defaults to False)
- Add toggle_ticket_deactivation service function
- Add PUT /api/v1/tickets/{ticket_id}/deactivate endpoint
- Reject deactivated tickets at registration
- Add deactivated column + toggle button to admin tickets table
- Show deactivated badge on public ticket page
- Add i18n keys (en/es/de) for deactivation UI
- Promo code inline editing: inline add input, edit dialog, show all codes with strikethrough for inactive
…d dialog

- Remove inline q-input + add button below promo code chips
- Add + icon button next to Promo Codes title
- + opens editPromoCodeDialog in add mode (codeIndex: -1)
- Dialog header shows Add/Edit based on codeIndex
- Remove addPromoCodeInline method and newPromoCodeInput data
- Remove '%' prefix from percent discount toggle label
- Remove '%' suffix from discount_percent input
- Change save button text to 'Save' with i18n key
- Add 'save' i18n key to en/es/de
@dadofsambonzuki

Copy link
Copy Markdown
Author

Depends on lnbits/lnbits#4047 which adds emailConfigured to PublicSettings for the email config check in the notification toggles.

dadofsambonzuki and others added 10 commits July 9, 2026 21:51
- Move order ID into buyer info section, hyperlinked to SatsPay order
- Show full basket and ticket IDs with labels
- Move paid/unpaid status below status icon
- Display 'Anon' instead of 'Guest checkout' for unnamed buyers
- Add event banner image as header
- Make show ticket and buy more buttons green (positive)
- Remove chevron icon from show ticket button
Ticket page:
- Event name at top, ticket type below
- Remove instructions text, payment status, and QR helper icons
- Print view shows event name and ticket type above QR
- Add Copy Link button that copies real URL instead of ticket:// scheme
- Inject inline i18n to fix race condition raw tags

API:
- Ticket endpoint returns event_name and ticket_type_name
- PublicTicket model extended with new fields
- Add i18n bootstrap to register.js to fix raw tags
- Fetch and display event name above Registration heading
- Add camera icon to scan button, center text
- Replace toast notifications with on-page success/error status cards
- Show failure reason text in error status card
- Link ticket ID to /events/ticket/{id} in status card and table
- Deduplicate scanned tickets in localStorage by ID
- Add ticket type name to register API response
- Make Ticket.reg_timestamp and PublicTicket.reg_timestamp nullable
- Return event_name and ticket_type_name from ticket page API
satspay sends json=charge.json() which double-encodes the body on
LNbits <1.5.5rc3. Parse the raw body and decode again if it's still
a string, so the handler works with both old and new satspay versions.
- Add missing events.anon, col_ticket_type, ticket_count_one/many,
  show_ticket, copy_url, continue_payment, basket_auto_update, total
  to en, de, es i18n dictionaries.
- Use request.json() for cleaner body parsing; only fall back to
  double-decode when satspay sends double-encoded JSON string.
- Branded HTML email template with banner, event dates, ticket type
  names, order summary with basket link, and LNbits footer
- Unify basket and single-ticket email paths into one template
- Admin sale notification redesigned as HTML with grouped ticket
  types/quantities, order summary above ticket list, basket link
- No QR images in emails, only 'Open ticket' links
- 'Anon' displayed for empty ticket holder names
- Per-event notification_subject/notification_body still override
- New preview endpoints: GET /events/{id}/preview/ticket-email
  and GET /events/{id}/preview/admin-email (key via query param)
- Preview buttons added to events admin UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant