I’m reaching out to you with regarding the WooCommerce Order Delivery extension. The plugin features and presentation can be seen here: [login to view URL]
Issue: With WooCommerce Order Delivery extension, a time buffer can only be set in days but not in hours. A buffer period of X hours between the moment a user wants to place order and next available delivery time slot is needed, which requires some code customisation.
How the plugin works:
Now, I’m using the plugin for an online flowershop.
This plugin injects 2 new fields into the checkout form that are Ajax powered:
- Delivery Date (Date picker - calendar style that opens at cursor input in the field),
- Delivery hours interval (Time picker displayed as time slots in a dropdown style, the field is loaded with Ajax after Delivery Date field is selected and filled);
In my current setup I’ve set the delivery days from Monday to Saturday, with the following 6 time slots:
08:00 - 10:00
10:00 - 12:00
12:00 – 14:00
14:00 – 16:00
16:00 – 18:00
18:00 – 20:00
I need a solution to add a buffer time of X hours for orders placed with same day delivery.
For the above example of time slots, if customer wants to place the order at let’s say 06:00 AM, he then should be able to choose only the time slot from 10:00 - 12:00 and above (In this example, I’ve choosed a buffer of flat 4 hours between hour of order and the first time slot available). This time buffer should be manageable at hour level.
Taking this further for another time slot, e.g. the customer which would visit the site on a particular day at 10.15 AM and the buffer time is set to 4 hours, then the immediate available time slot that should be available is 14:00 – 16:00.
So, in short, I need to be able to add a X-hours/minutes buffer between the moment an order is placed and next available delivery time slot.
This new setting should be available in the plugin settings.
The time buffer would then translate in the frontend in disabling the next X hours from the time slots dropdown list.
If you need more details for a clear understanding, I can provide them.
I've also made an video recording in order to have a clear understanding of the how the plugin works on front-end, you can check it on Youtube:
[login to view URL]
Every time slot is viewed as a single option in the dropdown (e.g. an entry in the time slot dropdown) so it doesn't matter that in fact that time slot is a static interval (a time window) rather than a particular hour format.
Basically if the current time + buffer matches an existing interval from the dropdown, that interval should be disabled in the frontend.
Nota bene: As I see it, the main trigger should be current time (time when user visits website) and based on that time, the time slots should be seen only as output entries that can or can't be available and not actual HH:MM (because they are simply some static time slots that can change anytime).
In short, if the time is 07:00 AM and the buffer is set to 4 hours, the 10:00 AM - 12:00 AM time slot should be made unavailable to choose in the frontend timepicker dropdown.