There are different types of bookings that can be dealt with using Booking & Appointment Plugin for WooCommerce. In version v4.10.0, we have made some amendments and introduced a new feature called Duration Based Booking. As the name suggests, this feature allows customers to book time slots for a particular duration.
The amendment made in this version is that the previously named Date and Time setting is now divided into Fixed Time and Duration Based Time setting. Here Fixed Time setting works same as Date and Time setting but the name has been changed to Fixed Time now.
Today we will discuss the 2nd type of Date and Time setting called Duration Based Time setting or Duration Based Booking.
Duration Based booking can be for various bookings like conferences, seminars, parties, meetings etc where customers want booking for a particular duration instead of a full day booking. Hence we decided to introduce a functionality that allows admin to add settings for minimum and maximum duration and its start time of the day. Accordingly the time slots are created on the frontend for the customers to select an appropriate duration for their booking.
This functionality is called Duration Based Time setting and it provides ease and flexibility to customers for making duration based booking.
To understand how Duration Based Time setting works, let us take an instance of a meeting hall where customers book the hall for a particular duration specific to their meeting hours.
So firstly, lets create a new product Conference Hall. Now enable Booking option and select Booking Type as Date & Time -> Duration Based Time under General tab as shown below and click on Save Changes button.
Selecting Booking type as Duration Based Time
Now let us set the availability for this product in the Availability tab. Since you have selected the Duration Based Time option, add the details for it in Set Duration Based Bookings section as shown below:
Settings added for Duration Based Bookings
As you can see, the settings added are as follows:
- Label: It is the text that states what action is to be taken. It is set to Select Duration.
- Duration: It is the time in hours for which the slots will be created on the frontend. This is set to 1 hour. You can also set this in minutes.
- Minimum duration: It is the minimum duration that customer has to select for his booking. This is set to 1 hour.
- Maximum duration: It is the maximum duration that customer can select upto for his booking. This is set to 3 hours.
- Maximum booking: It is the maximum number of bookings allowed for per slot (duration) created. This is set to 10 bookings per duration.
- Duration price: It is the price per time slot (duration) created. This is set to $50 per duration.
- First duration starts at: This is the time when the first time slot/duration will be created for the day. This is set to 10:00 AM.
- Duration end at: This is the time when the first time slot/duration will end for the day. This is set to 20:00 (08:00 PM).
Once all the settings are added and saved, let us Publish the product and view its effect on the frontend.
Note – It is mandatory to add Regular Price for the product on the Product Page irrespective of adding price for duration in Availability tab. This ensures that the product is available on Shop page for selling and you can move that to the cart.
The newly created product to take bookings for Conference Hall will appear on the front end of the website as shown below:
Product displayed on the front end
Now let us select the duration for the time slots to be created. As 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 frontend. You can select maximum upto 3 hours for Select Duration because Maximum duration was set to 3 hours in the backend.
So let us add Select Duration as 3 hours and booking date as 29th September, 2018. This will create time slots for 1 hour with maximum bookings shown as 10 bookings (as set in the backend):
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 as Duration end at option was set to 20:00 in the backend. Now lets select a time slot 1:00 PM for 29th September, 2018. The price will be calculated for 3 hours as shown below:
Booking Time selected
This shows that the Booking Time is added for 3 hours, from 1 PM to 4 PM and the Total Price is displayed as $150 because the price for each duration is set to $50 in the backend as shown in the above screenshot. Hence $50 x 3 = $150. But for instance, say if the Duration price is not set under Set Duration Based Booking section in the backend, then the product price which is $200 will be considered and so the Total Price then will be $600 ($200 x 3 = $600).
Click the Add to Cart button to add this booking to the Cart as shown below:
Booking added to the Cart
Thus the Cart page shows the booking details where Conference Hall has been booked for 29th September, 2018 from 1:00 PM for 3 hours. Click on Place Order button on the Checkout page to complete this booking.
Maximum Booking Availability
To understand Maximum Booking Availability, let us consider the same above instance where maximum bookings per time slot is set to 10 bookings and customer has already booked Conference Hall for 29th September, 2018 from 1:00 PM to 4:00 PM.
Now say another customer visits the site and selects the same day as 29th September, 2018 for booking the Conference Hall for 1:00 PM to 4:00 PM time slot, then the maximum availability for that time slot will be displayed as 9 left as shown below:
9 bookings left for time slot 1:00 PM – 4:00 PM
This shows that when a booking for a particular time slot is already made, the availability for that time slot decreases by the number of bookings made.
Now let us see another scenario where the Conference Hall is booked for 10 bookings for time slot 1:00 PM – 4:00 PM on 29th September, 2018. In this case, this time slot will not be displayed on the product page of Conference Hall for booking as shown below:
Time slot 1:00 PM – 4:00 PM is not displayed
As you can see, 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 frontend 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 frontend.
In this post, we saw how Duration Based Time option of Date and Time setting works. The above instance of a Conference Hall explained the functionality of this booking type and its maximum booking availability setting.
Duration Based Booking can be used for Meetings, Conferences, Workshops, Seminars etc where the booking is made for particular duration and not for the whole day.
We focussed on Simple Product in this post but it is also possible to use this setup with all WooCommerce product types.
Since creating time slots is done automatically by simply adding the duration settings, the setup will not take much time. If you are doing it for the first time it will approximately take 10 minutes to complete.
It is actually a boon to have Booking & Appointment Plugin for WooCommerce for duration based bookings as it ensures that you are never over-booked for any time slots and provides accurate and robust solution for all booking activities.