I have been working through the tutorials on the Roomify website. They’ve been very helpful to get started, but fall short on the online booking and pricing integration side. Taking a basic look at the documentation I assume a large portion of setting up the functionality is left up to the user; expected, since BAT is a set of tools more than a feature ready bundle.

I am running into issues which I assume the majority of “Let me setup a small reservation/booking system” users will run into when first installing BAT. If you complete installation (a small achievement for the novice), you’ll want to set up a couple of rooms, create a nice display with an option to book the specific room type and set a price for a specific period of time (be it an hour, a day or a week.) If you have more than a small number of rooms an availability search would also be nice.

Without spending hours experimenting I’m not sure what the correct approach is. It appears that the majority of BAT functionality will be handled through reference fields and Rules - à la Commerce - even though it seems like the correct solution it’s not immediately obvious when reading the docs.

The simplest way to create a booking is to change the state of an event to the appropriate state as described in Manage Units. This can either be achieved through the Event Management interface or programmatically.

In my use case reservations are made online, but payments are handled at arrival, thus one can safely avoid Commerce. So, here’s what I think can be done:

  1. Create a “Create Reservation” content type:
    1. Add your usual content fields (title, body etc.)
    2. Add a date field (start date).
    3. Add a duration field (interval) set to your event duration (hours, days etc).
    4. Add a price field to indicate price for set duration (possible the event price reference)?
    5. When the node is saved you can use rules to write the reservation to the calendar.
    6. Of course, you’ll need to add all kinds of other fancy rules to send email confirmations, automatically cancel booking if they’re not confirmed or checked in on time etc.
  2. For Commerce integration a product reference field and fire the reservation rule when the checkout is completed would work. It would actually be a little slicker since your duration field could update your AJAX price field directly.

Here’s where I get stuck:

  1. How do you check for availability before allowing the reservation to go through, and even before the customer hits “save”. There’s not like setting a reservation and getting an error back “that date isn’t available”.
  2. Maybe the BAT Calendar Unit Type Reference? That would at least show availability, but since the customer can’t click directly on the calendar like an Admin can the UI ends up being a little “clunky”.
  3. An alternative option is to get the faceted search up and running and allow users to search for availability first and have a booking button on the search result. The resulting Rule would need to be able to pull the date and duration information from the search and combine that with unit’s details to reserve that option. I’m not sure how easy that is to achieve.

Just trying to start a conversation here.

Comments

FranCarstens created an issue. See original summary.

acrollet’s picture

Status: Active » Closed (fixed)

We have added a bat_booking module.

FranCarstens’s picture

Awesome, thanks! You guys rock!

bisonbleu’s picture

The bat_booking.module referred to in #2 is part of the BAT project and comes with bat_booking_example.module.

See also documentation for Roomify for Accommodations.

bisonbleu’s picture

@FranCarstens, were you able to find answers to your questions? Care to share what you have learned?

I have read and replicated the Meeting Room example of the BAT for Drupal documentation, which is great by the way, but I'm still somewhat struggling with what to do after completing the Manage Units section.

More precisely, in the calendar view (admin/bat/calendar/1/meeting_room_availability), I can manage meeting rooms availability as well as meeting rooms cost but I cannot figure how/where these 2 event types can be connected to one another so that when I make a booking (in the admin UI) it translates into an actual cost.

kingandy’s picture

Personally I'm baffled by the BAT Booking module. It allows you to create a separate entity referencing a pre-existing Event, with a start and end date entirely unrelated to those of the Event. I'm not sure how that helps or how to leverage that into a commerce system. I guess I'm not sure what the actual goal of the module is?

I was kind of expecting a module that would help you create an Event (with a Fixed State of e.g. "Booked") attached to a selected Unit.