Forum Moderators: coopster
I'm about to start building a new site for a hotel which will include a booking system.
The hotel has 12 rooms. 6 Standard, 3 'deluxe' and 4 'state' rooms. The 3 bands have different rates depending on peak or off peak dates.
I need to make a system that allows for block bookings (upto 30 days) and rooms need to be made unavailbale obviously when they are booked out.
I'm at a complete loss as to where to start with this particular function, particularly the block booking aspect.
Has anyone done anything similar to this in the past?
But if you do decide to do it yourself a mysql database and a bit of php code should help you achieve a basic system and give you a lot of flexibility.
To help you understand the block booking proces, ive found that calender scripts prove to be quite insightful. There are plenty of those on HotScripts
This thread might also help:
[webmasterworld.com...]
What if someone wanted to book a room for 30 days, but no 1 room was available for that period. But instead there was 1 room for 9 days and another for the remaining time, requiring the visitor to change rooms part way. Should this be offered as an option?
The hotel has 12 rooms. 6 Standard, 3 'deluxe' and 4 'state' rooms.But 6 + 3 + 4 = 13, not 12... For the examples I give, I'm going to go with 13 rooms.
We started out way back when with a similar system (but for multiple properties). As penders pointed out, you'll run into a problem with trying to block out specific rooms (e.g., room 111 is reserved part of the 30-day period, room 112 is reserved another part of the 30 days, and room 113 is reserved another part of the 30 days, but they don't overlap. During the 30 days *a* room is available, so you'll just have to do some manual re-arranging.)
What we did is along the lines of creating a table for rooms and creating an entry for each day for each room type. For example, for June 19, 2008, there would be 13 rows: 6 for Standard, 3 for Deluxe, and 4 for State. When a reservation is made, the Availability field is set to False and the ReservationID field is set to the reservation number for one of whichever room type for each night of the reservation.
This makes checking for availability quick. When you enter the rooms into the system, it's a simple matter to allocate the appropriate price to each type/date combination.
Another option is to only add room rows to the table when a reservation is made (actually, it should be allocated when the reservation is confirmed- otherwise you'll have rooms blocked up that don't get reserved, potentially losing you other reservations). When checking availability, just check that the count of reservations for each dat of the reservation is less than the actual number of rooms (i.e., if you already have 3 reservations for Deluxe rooms on June 20, 2008, you can't take any more reservations for a Duluxe room spanning that date).
[edited by: LifeinAsia at 4:45 pm (utc) on June 19, 2008]
Forgive my bad maths, there are actually 13 rooms.
The two methods you mentioned are the ones I was considering. I wasn't sure if I was heading in the right direction but you've given me a little confidence in my methods.
Penders: The hotel would not be wanting to switch people between rooms so the way you mentioned would not really be viable. I know that if I was booking a stay in a hotel I wouldn't want to be moved to a different room halfway through.
Thanks for the advice everyone.