-1

I have set up bookable products in WooCommerce using the YITH WooCommerce Booking Plugin, specifically for managing bookings of both rooms and programs. The bookable products include various program options, and I am aiming to enhance the user experience by automatically adding appropriate add-on products based on the number of people selected for the program and their capacity requirements.

I attached the screenshot for visual presence.

enter image description here

enter image description here In this image, I provided more brief information. i hope this will work

For instance, in the context of program bookings, I have configured the following add-on room products, each with a capacity for 1 or 2 persons:

Room A (Quantity: 1)
Room B (Quantity: 1)
Room C (Quantity: 1)
Room D (Quantity: 12)
These rooms will be applicable according to the number of people and shown below in the "People" Field.  

I am seeking a solution to automate the process of assigning suitable add-on products based on the selected program and the number of people. Here are the two scenarios I am looking to address:

Scenario 1:

If a customer books a program for the dates 8 Aug to 10 Aug and selects 2 people, I want the system to automatically assign either "Room A" or "Room B" based on availability. If both "Room A" and "Room B" are already booked, the system should then assign "Room C." And if all three options are booked, the system should default to "Room D."

Scenario 2:

Similarly, if a customer books the same program for the same dates but selects 3 people, the system should automatically assign "Room C" if available. If "Room C" is not available, the system should then default to "Room D."

Additionally, it is crucial that add-on rooms are booked on the actual date of the program along with the program itself. If a room is booked as an add-on, no one should be able to book that room individually on the specific program date.

I believe that automating this process, while considering date restrictions, will greatly enhance the user experience and streamline the booking flow for our customers. I am open to exploring custom coding solutions, plugins, or any other effective methods to achieve this functionality seamlessly.

Any guidance, suggestions, or code examples that can help me achieve this dynamic add-on product assignment based on selected people, capacity, and date restrictions would be highly appreciated.

Thank you in advance for your assistance and expertise.

Ashish
  • 31
  • 7

0 Answers0