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

The Booking & Appointment Plugin for WooCommerce offers a helpful feature called Duration Based Time Booking. This feature allows customers to book time slots for a specific duration instead of booking for an entire day.

For example, let’s say you’re organizing a conference, seminar, party, or meeting. With Duration Based Time Booking, your customers can conveniently book a time slot for the exact duration they need, such as a 2-hour seminar or a 4-hour party.

As an admin, you can set these bookings’ minimum and maximum duration limits. You can also set the start time for the day. Based on these settings, the plugin will automatically create appropriate time slots on the front end for your customers.

Customers can select the duration that best suits their needs from the available time slots. This flexibility makes it easy for them to book the required amount of time without unnecessarily booking an entire day.

This guide will focus on a Simple Product, but using this setup with all WooCommerce product types is possible. Follow the walkthrough below to understand how Duration Based Time in the Date & Time Booking Type is utilized.

1. Configuring Duration Based Time 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 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).

You can publish the product once all the settings are added and saved.

*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 for selling on the Shop page, 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 in the Select Duration tab 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 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 as the 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 time slot 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, and 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 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 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 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 when 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, changing 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 Duration Based Time booking feature 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 1 No

How can we help?