Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Smart Reservations is a Drupal module consisting of a reservation system of holiday apartments, hotel rooms, villas or any type of accommodation.

Its main goal is to provide a simple way of managing and maintaining the rates and fees per person and night.

I originally created it for Casafont rural holiday apartments.

Rates

Calculation

  • When there is no Custom rate / fee for a specific date, the system uses the Default rates / fees to calculate the rates per night.
  • When there is no Default rate / fee for a specific night of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat), the system uses the General default rates / fees to calculate the rates per night.
  • The system applies a final Rate multiplier for each specific accommodation unit.

Parameters

  • Base rate. The base rate per night and person.
  • Children discount. Discount applied for each child per night. Example. with a Base rate of 25, and a Children discount of 5, the rate for each child will be 20.
  • Dogs fee. Fee applied for dog per night.
  • Single night fee. Additional fee for single night reservations.
  • Low occupancy fee. Additional fee per person for low occupancy reservations.
  • Low occupancy threshold. Number of guests below which (<=) the system applies the low ocuppancy fee. For example, if we have a threshold of 2 guests, and a low occcupancy fee of 10, the system will apply a low occupancy fee of 20, but if we have 3 guests there will be no low occupancy fee.

Data model

Entities

  • Accommodation unit. Any kind of hotel room, holiday apartment, villa, bungalow, lodge, etc. The instances of this entity are stored with a Drupal content type.
  • Reservation. A reservation of one or more Accommodation units for one or more nights. The instances of this entity are stored with a Drupal content type.
  • Reservation items. Reservation items per date for a specific reservation. The instances of this entity are stored in a database table.
  • Custom rate per night. Custom rates per date create by the business administrator. The instances of this entity are stored in a database table.
  • Search log. Reservation search queries submitted. The instances of this entity are stored in a database table.

Schema

smart reservations model

Reservation status

smart reservations reservations status

Installation

  • Option 1:
    • git clone git://git.drupal.org/sandbox/ray17n/2454023.git smart_reservations
      into your_drupal_website/sites/all/modules
  • Option 2:

    You can also install it into your_drupal_website/sites/all/modules/contrib.

  • Enable the module.

  • Configure the general settings and rates:

    • Settings: your_drupal/admin/config/content/smart-reservations
    • Default rates: your_drupal/admin/config/content/smart-reservations/default-rates
    • Custom rates (and calculated default values): your_drupal/admin/config/content/smart-reservations/rates
    • Search log: your_drupal/admin/config/content/smart-reservations/log
  • Create the accommodation units you need: Content - Add content - Accommodation Unit. The module also creates two sample ones, you can edit these ones or delete them.

  • The module also creates a block for searching reservations. The name of the block is Search reservations. You can also find it at your_drupal/admin/structure/block/manage/smart_reservations/search-reservations/configure

  • After submitting a search the block redirects to the page your_drupal/search-available/search_parms... You can change the URL of this page in the settings form.

  • You can also use the page your_drupal/search-available without using the block, and add a menu entry of this url to your main menu. You can also change the URL of this page in the settings form.

  • If an Accommodation unit is unpublished will not appear at the search availability results.

Screenshots

Search availability results

Search availability block

Submit a reservation

Main management panel

Default rates

Rates per night

General settings

Currency format settings

Search parameters settings

Payments settings

Messages settings

Project information

  • Module categories: E-commerce
  • Created by ray17n on , updated