How to prevent cache issues

If you use a cache plugin on your site, you might experience issues with showing the right non-available dates in the booking form. Although the dates are checked correctly when selected, the plugin has an option to bypass this possible error. In Booking Form settings, you can enable the option Update non-available dates on loading (AJAX) which allows loading non-available dates in Ajax when the user views the product.

update_non_available_dates

 

General information about booking availability

Users make a booking based on the dates that the system shows as available.
Availability can either be configured globally or from within the specific “booking” product.

Global availability

global_availability

Product availability

booking avail

Unavailable dates become unselectable for upcoming users.

Whether you are acting globally or on the single “booking” product, you’ll be able to create availability rules that apply only to one or more months or to a preset range of days and dates.
Let’s see how to do that.

Configure date/month range of the availability

First of all, we must select the time frame for which the availability rule shall be configured. You can choose between “Date range” and “Month range”.

Date range

date_range

Month range

month_range

To edit the availability status for the selected time frame, click on the button shown in the following image.

month_range_2

This way, no bookings can be made for the selected time frame.

Click on the icon shown in the image below to configure availability for each day of the week within the selected time frame.

Availability by day of the week

Set availability in single product

Go to “Booking availability” section in the product edit page to configure availability for the selected product.

booking buffer

Besides adding availability rules, as shown above, you can configure the following options:

  • Max bookings per unit: maximum number of bookings that can be accepted for the same day/month.
  • Allow booking no sooner than: the first available date will be automatically set x days/months from the date the user is making the booking.
  • Allow booking no later than: this is the latest available day for the booking and will be automatically set to x days/months from the date the user is making the booking.
  • Buffer: decide the time between one booking and the next. For example if you give in 1, the buffer time between two reservations will be 1 day. You will not be able to make a reservation for that day (or that time period).

Let’s make an example: suppose we want to configure your product so that the first available date for a booking is in two days’ time.
And suppose we don’t want that users can make a booking later than 5 days since they access the booking form.

If they access the form on 5th September 2016, the start date of the booking they can pick is between 7th September 2016 and 10th September 2016.

Booking availability options

Booking start date

  • Default start date: the start date is shown to users by choosing from Today, Tomorrow, First available, and Custom Date. 
  • Allowed start days: to define the days for the booking to start.

In this case, if you want to allow booking units starting from Monday, users won’t be able to select other days in the Start date.

bookingstartdays

To set the days availability, the plugin provides 3 different colors:

red: non-bookable

green: bookable

grey: not affecting the previous status settings.

perminutemonthrange1

Combine more rules of availability

When you decide to configure availability in the product, you’ll have to consider that these settings will override global availability rules, if any.
Rules can, then, combine with each other based on the following order:

  • First to be processed: global rules, from the latest to the first one.
  • Second: the system processes the rules set in the product, from top to bottom.

This implies that on the same time frame more availability rules can apply.

Example

Let’s make an example to better understand how to configure booking availability. Suppose we want to configure a rule that complies with the following conditions:

  • Users can book no date between June and August for no “booking” product in the store.
  • Availability for the product “Appartement Opéra” must be removed in September and October.
  • The product “Appartement Opéra” must be available for booking in June (unlike the other bookable products in the store).

In order to apply the first condition, we can create a global rule, as shown in the picture below.

combine_rules

In order to apply the second and the third conditions, we have to edit the settings within the product “Appartement Opéra”, which will be processed by the system after the global ones that have been already configured.

Check-in and Check-out info in product page

Booking product quantity

This plugin is very flexible and we’ve been asked many times about having a quantity field on the booking products. Unfortunately, this is not possible, as the bookable product has availability options that work differently from quantity.

Yet, if this is a required option, you can consider the following workaround and have the booking product work with quantity exactly as any other standard WooCommerce product.

To do so, you can start with creating a person and call it “Quantity”. Go to Bookings > People

people

person quantity

Then, go to the product settings to Booking People, make sure you enable the checkboxes Has people and Enable types of people.

The latter option will open all types of people created on your shop. Enable the one called Quantity and set a minimum and maximum amount for it, if any.

product settings

If you want to read more about all the available options for people, please, refer to this page.

Finally, this is how the product will look like.

frontend

Now, the last thing missing!

As you can see the quantity selector appears in a box called People. To remove it, you can go to YITH > Booking and deselect the option called Enable People Selector.

Enable people selector

This is the final result:

Quantity