#Ticket Booking example error when not using all row types in venue

2 messages · Page 1 of 1 (latest)

ember burrow
#

Hey guys,
I'm new to Medusa and I'm currently looking at the https://docs.medusajs.com/resources/recipes/ticket-booking/example. I noticed that when creating a venue and not using all the row types (VIP, Standard, Lounge, Balcony), this leads to a validation error when creating the product variant in step 9 (https://docs.medusajs.com/resources/recipes/ticket-booking/example#test-the-ticket-products-page).

I found that the variants array in create-ticket-product-modal always contains all the row types, even if the venue does't use them. By filtering them out, the validation error is fixed.

Maybe I missed something in the example, but when scrolling back to https://docs.medusajs.com/resources/recipes/ticket-booking/example#test-the-venues-page it actually also shows the usage of only some of the row types.

Thought I report this here if someone else stumbles across this

Explore Medusa's recipes, Commerce and Infrastructure modules, API and SDK references, storefront guides, how-to guides, tutorials, and more.

urban void
#

Hello, we've resolved this today by adding a filter in the CreateTicketProductModal: https://docs.medusajs.com/resources/recipes/ticket-booking/example#create-ticket-product-modal

Particularly in the handleStep2Submit where we filter out variants with seat count less than 0. Can you confirm whether that fixes your issue?

Explore Medusa's recipes, Commerce and Infrastructure modules, API and SDK references, storefront guides, how-to guides, tutorials, and more.