Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I have just started trying to use this module, it should do exactly what I want, but there are a far few bugs. I will be trying to work out more of these bugs in the next few weeks.
There are 3 files that need to be amended for the fix. The patch will also correct a typo in the variable table. It means after applying the patch you will have to re-select the weekdays you would like to hide the 'Book Now' link for.
Had some success with wobblers patch against the latest dev version but it doesn't fix the weekdays problem or available time slots.
So far I can;
1. See my datetime cck field in the admin of Booking Timelsots.
2. Link to a cloned copy of my Calendar from within admin.
3. Amend the calendar arguments and fields so they can be seen in my cloned Calendar Block and the actual Calendar.
4. Restrict Bookable times (on the calendar day display only) to the nearest hour. Hour from and to does work!
5. See the 'book now' link which links to the correct content type.
6. Create new content and see a link to it on the calendar block and in the calendar.
Issues that remain:
1. Restrictions on Days are not carried through to the Calendar. All days after today are bookable unless all slots have been used. It does however prevent booking dates/times before the current time :-).
2. Time slots are not shown beyond the 'on the hour' slots. I believe this is what 'Default length of time is supposed to cover ie.
Default length of timeslots
Hours: 0
Minutes: 15
should give the following timeslots presuming my start hour was 9:00am;
9:00am
9:15am
9:30am
9:45am
10:00am
10:15am etc...
But I get:
9:00am
10:00am
11:00am etc...
When selecting maximum available slots (Which I presume is per timeslot) it does show on the calendar and does restrict your bookings from the calendar but not from the content type directly. Not a major issue but I will have to block the create new content path from my client.
3. When creating content against a specific time, after create 1hour is removed from my actual time etc...
booked 10:00am
Content created as 9:00am
this maybe a daylightsaving issue on my setup but remains a problem for me right now.
I can see this module as nearly complete so good job! But I need to resolve these issues before I go live. One thing that would be to hard code my available dates into a string to overide the settings. Does anyone know what the variable is and which file it resides in? :-)
NB: Helpful notes to those poor frustrated soles (My lessones learnt;
1: In views always make sure all view types reflect the default and no overides exist.
2. Ensure all modules are activated before you start (Not all dependancies are clear)
3. Dont forget to add your templates to your working theme folder.
4. Clear all caches (Including views) after every change to see the result and assist debugging!
Thanks freestylegary, brilliant! That fixes the original 'WeekDay Restriction' issue. 1 slight error on 'Fix_1' - You need to add monday :-) That just leaves me with the timeslot issue which i'll create a new issue for. Could someone check and add these patches to the module to save anyone else from the head scratching?
Thank you for your work.
I've converted and moved most of the variables into preprocess functions.
Now it looks like:
function template_preprocess_booking_timeslots_day(&$vars) {
...
// Check if current weekday is available for booking
$week_availability = variable_get('booking_timeslot_not_avaliable', 1);
$vars['bt_weekday_avail'] = $week_availability[strtolower($today)] != '0';
Then from TPL file, you have directly access to $bt_weekday_avail variable.
Much cleaner.
I'll commit lots of changes very soon, after I'll test the code.
Does that mean that the "Weekdays which are not available for booking" setting doesn't work with weeks at all? Does it work with the 6.x-1.2 version? I guess I will go back to that version and see.
Comments
Comment #1
inky@inky3d.com commentedI have the same problem. Haven't been able to find any answers yet.
Anyone?
Comment #2
ekbiddle commentedLikewise, what's up with this?
Comment #3
kenorb commentedAble to pay up to £40, for person, who publish the working patch.
Comment #4
kenorb commentedMarked as duplicate: #690036: "Not available for booking" settings being ignored
Comment #5
wobbler commentedI have just started trying to use this module, it should do exactly what I want, but there are a far few bugs. I will be trying to work out more of these bugs in the next few weeks.
There are 3 files that need to be amended for the fix. The patch will also correct a typo in the variable table. It means after applying the patch you will have to re-select the weekdays you would like to hide the 'Book Now' link for.
Comment #6
UK_Rogue commentedHad some success with wobblers patch against the latest dev version but it doesn't fix the weekdays problem or available time slots.
So far I can;
1. See my datetime cck field in the admin of Booking Timelsots.
2. Link to a cloned copy of my Calendar from within admin.
3. Amend the calendar arguments and fields so they can be seen in my cloned Calendar Block and the actual Calendar.
4. Restrict Bookable times (on the calendar day display only) to the nearest hour. Hour from and to does work!
5. See the 'book now' link which links to the correct content type.
6. Create new content and see a link to it on the calendar block and in the calendar.
Issues that remain:
1. Restrictions on Days are not carried through to the Calendar. All days after today are bookable unless all slots have been used. It does however prevent booking dates/times before the current time :-).
2. Time slots are not shown beyond the 'on the hour' slots. I believe this is what 'Default length of time is supposed to cover ie.
Default length of timeslots
Hours: 0
Minutes: 15
should give the following timeslots presuming my start hour was 9:00am;
9:00am
9:15am
9:30am
9:45am
10:00am
10:15am etc...
But I get:
9:00am
10:00am
11:00am etc...
When selecting maximum available slots (Which I presume is per timeslot) it does show on the calendar and does restrict your bookings from the calendar but not from the content type directly. Not a major issue but I will have to block the create new content path from my client.
3. When creating content against a specific time, after create 1hour is removed from my actual time etc...
booked 10:00am
Content created as 9:00am
this maybe a daylightsaving issue on my setup but remains a problem for me right now.
I can see this module as nearly complete so good job! But I need to resolve these issues before I go live. One thing that would be to hard code my available dates into a string to overide the settings. Does anyone know what the variable is and which file it resides in? :-)
NB: Helpful notes to those poor frustrated soles (My lessones learnt;
1: In views always make sure all view types reflect the default and no overides exist.
2. Ensure all modules are activated before you start (Not all dependancies are clear)
3. Dont forget to add your templates to your working theme folder.
4. Clear all caches (Including views) after every change to see the result and assist debugging!
And thanks again for the module...good job!
Comment #7
freestylegary@yahoo.com commentedThe display is controlled in the them files. First-time making patch file. Couldn't keep it down to 1 file. Should fix the display issue though.
Comment #8
UK_Rogue commentedThanks freestylegary, brilliant! That fixes the original 'WeekDay Restriction' issue. 1 slight error on 'Fix_1' - You need to add monday :-) That just leaves me with the timeslot issue which i'll create a new issue for. Could someone check and add these patches to the module to save anyone else from the head scratching?
Comment #9
kenorb commentedPatch files are not valid, they not containing files to patch.
http://drupal.org/patch
http://www.werockyourweb.com/patching-drupal-modules-in-windows
http://drupal.org/node/620014
Committed only the first one (booking_timeslots_calender_fix_1.patch).
Comment #10
freestylegary@yahoo.com commentedCreated a new patch file for the remaining ones. Patch created for the master version on Git. Does it need to be for the 6.x branch?
Comment #11
kenorb commentedThank you for your work.
I've converted and moved most of the variables into preprocess functions.
Now it looks like:
Then from TPL file, you have directly access to $bt_weekday_avail variable.
Much cleaner.
I'll commit lots of changes very soon, after I'll test the code.
Comment #12
kenorb commentedCommitted.
http://drupalcode.org/project/booking_timeslots.git/commit/08436ed
Because of lots of changes in the code, latest dev potentially could have some bugs, do module backup before upgrading (to easily back to previous one in case).
Comment #13
kenorb commentedOn day view is done, what's left it's logic for week and month view.
template_preprocess_booking_timeslots_week() and template_preprocess_booking_timeslots_month()
http://drupalcode.org/project/booking_timeslots.git/commit/43348bb
Comment #14
UK_Rogue commentedDoes this fix the timeslot granularity issue?
Comment #15
UK_Rogue commentedBump
Comment #16
chales commentedRe: #13
Does that mean that the "Weekdays which are not available for booking" setting doesn't work with weeks at all? Does it work with the 6.x-1.2 version? I guess I will go back to that version and see.
Comment #17
reswild commentedHere is a patch to fix this issue in the month view (and also to not show links for days in the past).
Comment #18
kenorb commented