1. Home
  2. Booking & Appointment Plugin for WooCommerce – NEW
  3. Types of Bookings
  4. Duration Based Time in the Date & Time Booking Type

Duration Based Time in the Date & Time Booking Type

With the Booking & Appointment Plugin for WooCommerce plugin, you can use the Duration Based Booking feature to allow customers to book time slots for a particular duration.

It can be used for various bookings like conferencesseminarspartiesmeetings, etc where customers want to book for a particular duration instead of a full-day booking.

Admins can add settings for minimum and maximum duration and the start time of the day. Accordingly, the time slots are created on the front end for the customers to select an appropriate duration for their booking.

In this post, we will focus on a Simple Product but it is also possible to use this setup with all WooCommerce product types. Click the section you wish to visit:

1. Configuring Duration based booking

2. Maximum booking availability

1. Configuring Duration based booking 

1. A. ADMIN SECTION

To understand how the Duration Based Time setting works, let us take the example of a conference hall. The customers book this hall for a particular duration specific to their meeting hours.

Start by creating a new product Conference Hall.

Enable the booking option and select the Booking Type as Date & Time > Duration Based Time under the General tab as shown below.

Duration Based Time in the Date & Time Booking Type - Tyche Softwares Documentation

Selecting Booking type as Duration Based Time

Set the availability for this product in the Availability Tab. You will find the following settings under this tab:

Duration Based Time in the Date & Time Booking Type - Tyche Softwares Documentation

Duration Based Time in the Date & Time Booking Type - Tyche Softwares Documentation

Settings added for Duration Based Bookings

  1. Label: It is the text that states what action is to be taken. It is set to Select Duration.
  2. Duration: It is the time in hours for which the slots will be created on the front end. This is set to 1 hour. You can also set this in minutes.
  3. Gap between durations: This will let you set a time gap between two booking times. Based on this gap, your durations will be created. This is set to 30 minutes.
  4. Minimum duration: It is the minimum duration that the customer has to select for their booking. This is set to 1 hour.
  5. Maximum duration: It is the maximum duration that a customer can select up to for their booking. This is set to 3 hours.
  6. Maximum booking: It is the maximum number of bookings allowed per slot (duration) created. This is set to 10 bookings per duration.
  7. Duration price: It is the price per time slot (duration) created. This is set to $50 per duration.
  8. Duration start & end range for days: This is the time when the first time slot/duration will be created for the day. This is set to 10:00 AM. This is also the time when the first time slot/duration will end for the day. It is set to 20:00 (08:00 PM).

Once all the settings are added and saved, you can Publish the product.

*Note – It is mandatory to add the Regular Price for the product on the Product Page irrespective of adding the price for the duration in the Availability tab. This ensures that the product is available on the Shop page for selling and you can move that to the cart.

1. B. CUSTOMER SECTION

The newly created product to take bookings for the Conference Hall will appear on the front end of the website as shown below:

Duration Based Booking - Tyche Softwares Documentation

Product displayed on the front end

Since we have selected Duration as 1 hour and Minimum duration as 1 hour in the backend, 1 hour will be automatically added for Select Duration on the front end.

You can select a maximum duration of 3 hours. That’s because the Maximum duration was set to 3 hours in the backend.

Let’s say that your customer selects the duration as 3 hours and the booking date as 14th March 2023.

This will create time slots for 1 hour with maximum bookings shown as 10 bookings (as set in the backend):

Duration Based Booking - Tyche Softwares Documentation

Time slots created as per the settings

As you can notice, the time slots are created for 1 hour each from 10 AM onwards because the First duration starts at option was set to 10 AM and ends at 08:00 PM.

Since you had added 30 30-minute time gap between each booking, the timeslots have been created accordingly:

Time slot 1: 10:00 AM to 11:00 AM 

a gap of 30 minutes 

Time slot 2: 11:30 AM to 12:30 PM

a gap of 30 minutes

Time slot 3: 1 PM to 2 PM and so on. 

Now, let’s select a 1:00 PM timeslot on 14th March 2023. The price will be calculated for 3 hours as shown below:

Duration Based Booking - Tyche Softwares Documentation

Booking Time selected

The Booking Time gets added for 3 hours where the Total Price displayed will be $150 because the price for each duration is set to $50. Hence $50 x 3 = $150.

For instance, if the Duration price is not set under the Set Duration Based Booking section in the backend, then the product price which is $200 will be considered. Thus, the Total Price in this case will then be $600 ($200 x 3 = $600).

It is also to be noted that currently there are 10 bookings available for the 1:00 PM time slot.

Once the Conference Hall is added to the Cart Page, it will look like this:

Duration Based Booking - Tyche Softwares Documentation

Booking added to the Cart

It will show the booking details of the Conference Hall that has been booked for 14th March 2023 from 1:00 PM for 3 hours.

Click on the Place Order button on the Checkout page to complete this booking.

2. Maximum Booking Availability

To understand Maximum Booking Availability, let’s consider the same above instance where the maximum bookings per time slot are set to 10 bookings.

SCENARIO 1

Our customer has already booked the Conference Hall for 14th March 2023 from 1:00 PM for 3 hours.

Another customer visits the site and selects the same day as 14th March 2023 to book the Conference Hall at 1:00.

The maximum availability for that time slot will be displayed as 9 left till 4 PM as shown below:

Duration Based Booking - Tyche Softwares Documentation

9 bookings left for time slot 1:00 PM – 4:00 PM

Thus, when a booking for a particular time slot is already made, the availability for that time slot decreases by the number of bookings made.

SCENARIO 2

Let us consider another scenario where the Conference Hall is booked for all 10 bookings for the time slot 1:00 PM on 14th March 2023.

In this case, this time slot will not be displayed on the product page as shown below:

Duration Based Booking - Tyche Softwares Documentation

Time slot 1:00 PM to 4:00 PM not being displayed

The time slot of 1:00 AM to 4:00 PM reached its maximum limit and therefore was unavailable.

Hence, unavailable time slots were not displayed on the front end for selecting the Booking Time.

Moreover, if the customer changes the Duration for the above instance to 2 hours, then time slots from 12:00 PM to 4:00 PM will not be displayed.

Hence change in the Duration affects the display of available time slots on the front end.

Duration Based Booking - Tyche Softwares Documentation

The time slot 12:00 PM to 4:00 PM is not displayed

Thus, the feature of duration-based bookings in the Booking & Appointment Plugin for WooCommerce plugin ensures that you are never over-booked for any time slot!

Was this article helpful to you? Yes No

How can we help?