Event is overbooked

  • cBerti
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago - 11 years 11 months ago #43806 by cBerti
Event is overbooked was created by cBerti
Hello
I'm using version 1.5.3 and have following issue:

if several users are booking at nearly the same time, it could hapen that the event is overbooked because seats are not blocked during registration process. The result is that we have more registrants then places available (see example in attached picture).

is a solution for my problem in version 1.5.3 or a newer version available?

Many thanks for your help.
cBerti
Last edit: 11 years 11 months ago by cBerti.

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #43836 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Event is overbooked
Hi cBerti

I am sorry. At the moment, we have no solution for this issue. If the two users book for the event almost at the same time (before the first registration is successfully stored in the database), this issue won't be happen

To be honest, I don't know what can be the best way to handle this situation. Do you have any recommendation ?

Tuan

Please Log in or Create an account to join the conversation.

  • cBerti
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago - 11 years 11 months ago #43861 by cBerti
Replied by cBerti on topic Event is overbooked
Hi Tuan,

thanks for the quick reply!

I would try to make it working on the following way, but I'm not sure if it is possible to make it running.

1) As soon a user is pushing the registration button 1 seat is temporary blocked and the available seats are decreased by one.
2) User has a predefined time (for example. 5 minutes) to finish the registration process
3a) if registration process is completed with success, temporary blocked seat is definitively assigned to User.
3b) if registration process isn't finished in time, seat will be released and other Users can book this seat.

Regards
Last edit: 11 years 11 months ago by cBerti.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #50529 by Alex Newton Levey
Replied by Alex Newton Levey on topic Event is overbooked
Hey Tuan,

It is very possibly to fix this bug fairly quickly. You have a couple of options at your disposal but the least intensive is to make use of Joomla's transactional JDatabase system.

The main points you need to know:
$db->transactionCommit();
$db->transactionRollback();
$db->transactionStart();

I was able to implement this on my site (Which uses the cart checkout functionality) using the transactional system that comes with Joomla.

A far better way from a UX perspective would be temporarily allocated users to an event as soon as it's added to their cart or through the other checkout methods. Just put a timestamp on when the temporary allocation was made & if it's over 5 minutes old then treat it like it doesn't exist (Probably put some cleanup code in there somewhere so it removes those temporarily allocated rows at some point).

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc