The ability to work with all types of WooCommerce products like a Variable product, Bundles, Composite products, etc., makes our Booking & Appointment Plugin for WooCommerce most flexible and beneficial for many businesses.
So now let us move ahead and learn how to set booking availability limit for attributes in WooCommerce Variable Products. We will also see how attribute values are considered as quantity for WooCommerce Variable Products.
Businesses running hotels or resorts, etc., have many types of rooms with different categories. They have to be vigilant and make overbooking of each type of rooms for a date. This is possible if you set the lockout for each attribute for your WooCommerce Variable product.
So lockout for each attribute is used to prevent the same from overbooking for a date. When attribute values are set in numeric then that values are considered as quantity for the same attribute. And the attribute lockout will control the number of bookings of that particular attribute.
For instance, if you are running a hotel with different types of rooms like Deluxe rooms and Super Deluxe rooms and it has only 5 Deluxe rooms and 10 Super Deluxe rooms which are available for booking. Then you have to set the values for your attributes Deluxe rooms – 1,2,3,4,5 and Super Deluxe rooms – 1,2,3,4,5,6,7,8,9,10. As the attribute values are numeric it will be considered as quantity.
You have 5 Number of Delux rooms and 10 Number of Super Delux rooms, so the attribute lockout is to be set the same, as you can take bookings as per the room availability only for a particular date. If the customer books 4 Number of Delux rooms and 5 Number of Super Delux rooms on a particular date. Then only “1 Number of Delux room” and “5 Number of Super Delux rooms” will be available for further booking on that same date.
Let us take an example to understand how to set the lockout for each attribute and how it works.
For instance, you are operating One Day Tour for Singapore Night Safari. Firstly you need to create a product Singapore Night Safari on your store from Products ->Add Product link.
As you are operating one day tour and you want that the customers should first choose the Number of Adults and Number of Children before the booking date. Therefore you will need to use variations so that the user gets an option to choose the Number of Adults and Number of Children first and then the booking date.
For this, you need to create a Variable bookable product.
Created attribute and its variations for Singapore Night Safari are as follows:
- Number of Adults: 0,1,2,3,4,5,6,7,8,9,10
- Number of Children: 0,1,2,3,4,5
The Lockout value for attribute Number of Adults is set as 10 and attribute Number of Children is set as 5 as shown below. Click on Save attributes button to save it.
Note: For a variable product you need to Publish the product once you have created all the attributes and its variations, else it will not show the Lockout option.
Adding Booking Lockout for Attribute
Till now we have created all the attributes, variation and each attributes lockout for the Singapore Night Safari with WooCommerce Variable product. To convert this product to a bookable product we have Booking meta box where all the booking related settings are located.
Here, first Enable Booking option and select Booking Type as Single Day as shown below. Click on Save Changes button to save these settings.
Enable Booking and select the Booking Type
Now go to Availability tab and select the Bookable Weekdays from the Weekdays table as shown below. This will allow your Singapore Night Safari to be bookable on any weekdays as selected. You can change it as per your requirement.
Also, as you can notice the value of Maximum Bookings is to be set as the sum of all the attribute lockouts as shown above.
So as per the example, we have 2 attributes with the Lockout set to 10 for Number of Adults and 5 for Number of Children. Thus, the value in Maximum Bookings option is set as 15.
After finishing the above steps, your product Singapore Night Safari is ready for booking.
Your product Singapore Night Safari will look like this when the customer visits your website to book it.
Product displayed on the front end
The customer comes to your site for booking. He books Singapore Night Safari for 5 Adults and 3 Children for 22nd December, 2017 as shown below:
Selecting number of adults and children and date for booking
After the booking is done, 5 bookings are left for Number of Adults and 2 bookings are left for Number of Children as per the attribute lockout set for each attribute.
Now if any customer comes to your site and tries to book on the same date, say for 22nd December, 2017 for 7 Adults and 3 Children, then a message is displayed on the product page as shown below:
Message displayed to indicate availability of bookings
The above message is displayed based on the lockout set for each attribute.
You can set more than one attributes for your Variable product same way as we have created in the above example for Number of Adults and Number of Children. You can also set different lockouts for each attribute based on your business requirement. Similarly, we have created Lockout as 10 for Number of Adults and 5 as Number of Children.
This ensures that you only take as many bookings for your customers as you can accomodate. So if you can fit in only 10 adults, it will only allow 10 bookings for adults. If you can take 5 children, it will only allow 5 bookings for children. This prevents overbooking for your different user types.
Rental business like Dress Rentals, Car Rentals are businesses that can set their attribute values in numbers. So that when the customer comes to rent Party Dress or Car, they will be able to select Number of Dress or Number of Cars as per their requirement.
In such cases, the attribute values are considered as quantity as the value set for attributes are numeric. To prevent overbooking the lockout for each attribute is to be set.
The Booking & Appointment Pro for WooCommerce plugin allows you to thus set the availability in three ways: Based on the Quantity field (date or time slot), Based on Variation & Based on Attribute. This flexibility ensures that you are able to meet different booking needs with our plugin.