verbb / events

Craft CMS Plugin for events management and ticketing.
Other
22 stars 13 forks source link

Improvement request: Client trying to reduce the total capacity below the value of tickets already sold #32

Closed satcreative closed 4 years ago

satcreative commented 5 years ago

My client has set up an event with the total capacity set to 64. The event has then sold 44 tickets. They have then reduced the total capacity to 16. At this point, if a user attempts to add a ticket to their basket, it results in a 500 error.

I understand that this is due to the plugin having sold more historical tickets than it's new total capacity, which contradict its logic and results in an error. This is definitely a user error on the part of my client and I have told them not to reduce the total capacity after the initial setup of the event.

As a way to prevent this from happening again in the future, I was hoping that an error can be added in the event CP to prevent the content editor from reducing the total capacity below the number of tickets that have been sold at that time.

satcreative commented 5 years ago

Update on this issue: It seems if the individual ticket type quantities are changed, the total capacity changes automatically to the sum of all the ticket type new quantities. This is the reason we are seeing the 500 error as the total capacity is automatically lowered to a value below that of the total tickets already sold.

To get around this we are having to manually change the total capacity back to its original value before the individual ticket quantities were changed.

Surely this can't be right. Is this a bug?

engram-design commented 4 years ago

Yeah, so this is a good point. The total quantity of tickets should be inclusive of all sold and unsold - it should typically be the capacity of the event venue - if we're talking about things in terms of an actual event. So reducing this number to 16 will put it into an oversold state immediately.

So the reason for the auto-changing of the capacity for the event is trying to make it easy for clients not to miss this setting.

Say you have an event with a total capacity of 40, you have 2 ticket types, with a capacity of 20 each (just for simplicity), as such, it splits evenly. But say you lower one ticket types capacity to 10 - you would expect there to only be 30 available tickets, but because the event capacity would be unchanged (still at 40), the event could be potentially oversold.

Having said that - I'm not actually sure this scenario would play out. As you've got limits on each ticket type, only 20 of one ticket type could be purchased, and 10 of the other, leaving 10 simply unavailable to purchase.

I'll fixed up this auto-changing behaviour in light of this in 1.1.7

Hope that all makes sense.