Hey,
I’m working on building a marketplace and want to give the “Seller” the ability to set their hours of operations by picking days of the week and hours for a given day.
Most plugins I’ve found so far help schedule specific dates and times but not a recurring schedule by week.
Does anyone know of a plugin or an alternate way to go about this?
Thanks,
Gokul
1 Like
Hey @gokulmadan2
- You need to create a data type Availabilities with the following fields:
- Available (of type yes/no)
- Day (of type text)
- DayNumber (of type number)
- OpeningHour (of type date)
- ClosingHour (of type date)
-
Add a field Availabilities (list of Availabilities) to your User data type
-
When User is created, create 7 new Availabilities (one for each day) and add them to User’s Availabilities
- Day: Sunday; Monday; Tuesday and so on
- DayNumber: 0; 1; 2; 3; 4; 5; 6 (Sunday = 0; Monday = 1, Tuesday= 2 and so on)
- To let the User define his availabilities, create a RG (7 rows, 1 column) and set the data source to Current User’s Availabilities. Each row is one day. Include the following elements in the first cell, from left to right:
- 1 checkbox (set to Dynamic: Current cell’s Availabilities’ Available)
- 1 text (set to Current cell’s Day)
- 2 date/time pickers, one for the OpeningHour and the other for the ClosingHour - I recommend using this plugin by @seanhoots
- Create following workflows:
- When checkbox’s value is changed and checkbox is checked > Make changes to Current cell’s Availabilities: Available = yes
- In the same way, when checkbox’s value is changed and checkbox is unchecked > Make changes to Current cell’s Availabilities: Available = no
- When AirDate/TimePicker A’s value is changed > Make changes to Current cell’s Availabilities: OpeningHour = This AirDate/TimePicker’s value
- In the same way, when AirDate/TimePicker B’s value is changed > Make changes to Current cell’s Availabilities: ClosingHour = This AirDate/TimePicker’s value
Your User can therefore define the days they are available by checking the checkbox, and set the opening and closing hours for those days. You can also have a condition to hide the date/time pickers when Current cell’s Availabilities’ Available = no
Hope that helps!
3 Likes
Hey @ambroisedlg,
This is amazing.
Thanks for the very detailed instruction and such a quick response. You’ve saved me hours of trial and error.
Thanks,
Gokul
You’re welcome happy to help 
Hello,
This is so great, exactly what I needed as well! Would anyone be able to kindly help me with the below part, though? I’m confused about how to implement it (I’m having a hard time understanind lists):
"2. When User is created, create 7 new Availabilities (one for each day) and add them to User’s Availabilities
- Day: Sunday; Monday; Tuesday and so on
- DayNumber: 0; 1; 2; 3; 4; 5; 6 (Sunday = 0; Monday = 1, Tuesday= 2 and so on)"
Can anyone help show me how exactly to do this?
Thank you!!
Thank you!! This is great
1 Like
How do you deal with end of day reservations?
If sellers open hours are Monday 7PM to 2AM Tuesday and Tuesday from 7PM to 2AM Wednesday.
And you show the list of sellers on a listing page where the user can select the date/time that he would like to reserve/visit
How would you:
- Let the seller select the open hours of business
- Make it so that the user who is searching for a seller on the listing page only sees the listing that are open during the user’s selected hours. So if user A wants to reserve Monday from 5-6, the listing A (open from 7PM to 2AM) would not show.
- And how do you deal with the scenario where user A wants to reserve from Monday 11PM to 1AM Tuesday?