| 9:05 am on Jun 19, 2008 (gmt 0)|
You might be making a mistake if you are trying to code this as of now (you posted the question in PHP forum), you need to make at least a quick system analysis on what goes into the system. You might end up having a system with no practical use too, as this requires a regular user input.
| 9:07 am on Jun 19, 2008 (gmt 0)|
Yeah, the analysis is the stage I'm at now. Maybe I posted this in the wrong forum :S
| 10:45 am on Jun 19, 2008 (gmt 0)|
try sth off-the-shelf. much better and way cheaper
| 10:48 am on Jun 19, 2008 (gmt 0)|
Yep, look for CMS... I am sure they are plenty of things similar already done. Try and compare - and not only the free stuff :)
| 11:09 am on Jun 19, 2008 (gmt 0)|
I would certainly tryout off the shelf stuff as suggested by others. It will most definitely be easier.
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:
| 1:04 pm on Jun 19, 2008 (gmt 0)|
I've programmed complex shopping carts etc in the past I just can't quite get my head round this one.
The problem lies in the complexity of the client's pricing system.
I've had a look at a couple of sample scripts and nothing supports anything like the complexity I need.
| 1:50 pm on Jun 19, 2008 (gmt 0)|
Just a general thought regarding (block) bookings (which I don't is mentioned in that other thread [webmasterworld.com]), this may not be a requirement of your system anyway...
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?
| 4:43 pm on Jun 19, 2008 (gmt 0)|
One minor comment: you said
But 6 + 3 + 4 = 13, not 12... For the examples I give, I'm going to go with 13 rooms.
|The hotel has 12 rooms. 6 Standard, 3 'deluxe' and 4 'state' 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]
| 4:16 pm on Jun 21, 2008 (gmt 0)|
I have something similar, I have properties with availability.
I have one table for all the properties with all their prices in datefield though there are diferent prices for diferent months, this table I need to update and change the year, and in another table I insert the bookings in 2 fields, one for arrival and one for departure, and based on that I get the availability, this way you dont have to redo the table availability every year.
But it was very dificult to do the availability for the web, I had help with that in this forum.
| 3:51 pm on Jun 23, 2008 (gmt 0)|
Thanks for that LifeinAsia.
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.