Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
Fix sold out ticket breaking preventing checkout
Dave Earley99f39648e67b
diff --git a/frontend/src/components/routes/ticket-widget/SelectTickets/index.tsx b/frontend/src/components/routes/ticket-widget/SelectTickets/index.tsxindex 221bffed4..89e9ebbdc 100644--- a/frontend/src/components/routes/ticket-widget/SelectTickets/index.tsx+++ b/frontend/src/components/routes/ticket-widget/SelectTickets/index.tsx@@ -183,6 +183,17 @@ const SelectTickets = (props: SelectTicketsProps) => {})});+ // this is hacky way to add empty quantity for a sold out ticket.+ // this is needed to avoid validation error when the ticket is sold out.+ // @todo - refactor this code so returning here doesn't break the checkout process.+ if (quantitiesValues.length === 0) {+ quantitiesValues.push({+ quantity: 0,+ price_id: 0,+ price: 0,+ })+ }+ticketValues.push({ticket_id: Number(ticket.id),quantities: quantitiesValues,