I love this module, great job!

Something seems to be an issue. In the existing issues others have asked the same question but I can't locate an accurate answer.

Is there a way to load the node type that has been created and selected in the settings page from the book now link.

In one of your responses to the question it seemed the underscore in the name may have created a conflict - I changed that = no change.

In another response you mentioned the booking default slot time i.e. 1hr 30min, you suggested adjusting the "To Date" time where you loaded an image to show http://drupal.org/files/issues/Booking_timeslots%20-%20To%20Date.jpg - I changed this also = no change

I am also, just trying to make this module function more streamlined and easy for the user to operate. Loading the Create Content page listing all the available nodetypes to the user is ok but it would be powerful and very cool to just load the nodetype for the booking of the timeslot.

I appologise for repeating the question, I just couldn't find a fix.

I am very thankful for your support here, the response times are very impressive. I am only marking as critical because I am attempting to launch a newsletter to announce the use of the booking form, can't wait to check the response.

You may want to combine this issue with the others that have asked a similar question.

thanks again.

Comments

kenorb’s picture

Is there a way to load the node type that has been created and selected in the settings page from the book now link.

Load the node where and for what reason?
1. You may look for permission: 'show booking dates'
Users with that permission see nodes on the booked slots, so you can click it and after clicking 'More...' node will be loaded.
2. If you want to make lists of already booked slots of specified type, you can create a View table and it could be available for your users. Then they can list their bookings, edit their own, delete or whatever.
If it's not that you meant, please describe it more clearly.

Loading the Create Content page listing all the available nodetypes to the user is ok but it would be powerful and very cool to just load the nodetype for the booking of the timeslot.

If you have proper set configuration, it will load Creation of specified type, not Create Content page listing.
Make sure that you have the right configuration on Booking Timeslots Settings Page and you selected the right content type for the right View calendar.

smw’s picture

I have gone over the settings page a dozen times and changed the view. Everything works perfectly except -

Any user with permission to see and make a booking, when they click the book now on the month view it takes them to the day view; when they click the book now link it loads the "Create Content Page" displaying a long list of node types.

I have settings page listing the booking node type to the field_datetime

I have the view loading the fields of this datetime as long as it is published node.

the booking timeslot works perfectly everywhere else I can make a booking and it display correctly on calendar, just not loading the booking node for ease.

kenorb’s picture

Can you send me what's the URI link from the Day view to this "Create Content Page"?

smw’s picture

http://wellbeing.tv/calendar/2009-07-26

Usually only available to authenticated users but I have only made the booking content type accessible and editable for anonymous users for your test.

Could you send me an export of a standard view for calendar so I can see your configuration perhaps?

I've noticed something odd with the way the calendar looks on the left side it displays the last row of dates in a vertical column see http://wellbeing.tv/calendar

kenorb’s picture

You have link: node/add/0/2009-07-26%2010%3A00%3A00
0 means that your content type has been not detected.

- Can you check if you made update.php after module upgrade? See: http://drupal.org/node/478446#comment-1652678
- Can you re-save your settings again on Form Settings?
- Can you dump for me following settings from your db:

SELECT * FROM variable WHERE name LIKE "booking_timeslot_%"
smw’s picture

This is the data dump before I totally deleted it and removed the module

#
# Table structure for table `mainHubcontent_type_timebooking`
#

CREATE TABLE `mainHubcontent_type_timebooking` (
`vid` int(10) unsigned NOT NULL default '0',
`nid` int(10) unsigned NOT NULL default '0',
`field_datetime_value` datetime default NULL,
`field_name_booking_value` longtext,
`field_phone_booking_value` varchar(11) default NULL,
`field_datetime_value2` datetime default NULL,
PRIMARY KEY (`vid`),
KEY `nid` (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Then I re-installed the module and edited the datefield to hold only one type of content field and changed the name. I have uploaded images as screenshots to show each setting for view, timebooking and content type fields viewable at http://www.wellbeing.tv/timebookingpage.html

smw’s picture

New dump with renewed settings # phpMyAdmin SQL Dump
# version 2.5.5-pl1
# http://www.phpmyadmin.net
#
# Host: localhost
# Generation Time: Jul 31, 2009 at 06:39 PM
# Server version: 5.0.45
# PHP Version: 5.1.6
#
# Database : `wellbeing`
#

# --------------------------------------------------------

#
# Table structure for table `mainHubcontent_type_appointmenttimebooking`
#

CREATE TABLE `mainHubcontent_type_appointmenttimebooking` (
`vid` int(10) unsigned NOT NULL default '0',
`nid` int(10) unsigned NOT NULL default '0',
`field_apptdate_value` datetime default NULL,
PRIMARY KEY (`vid`),
KEY `nid` (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

#
# Dumping data for table `mainHubcontent_type_appointmenttimebooking`
#

still directing to create content page

Thanks for your help here.

kenorb’s picture

Can you dump for me following variables from db?

SELECT * FROM variable WHERE name LIKE "booking_timeslot_%"
smw’s picture

When I open a query window in PHPMyAdmin

and enter your query SELECT * FROM variable WHERE name LIKE "booking_timeslot_%"

I get the following -

Error

SQL-query :

SELECT *
FROM variable
WHERE name
LIKE "booking_timeslot_%"
LIMIT 0 , 30

MySQL said:
#1146 - Table 'wellbeing.variable' doesn't exist

I feel a bit silly here but is there another way for me to extract that information you are after or is there a table missing in my DB?

kenorb’s picture

you have some db prefix that's why so probably it will be mainHubvariable instead of variable

smw’s picture

# phpMyAdmin SQL Dump
# version 2.5.5-pl1
# http://www.phpmyadmin.net
#
# Host: localhost
# Generation Time: Aug 03, 2009 at 10:11 AM
# Server version: 5.0.45
# PHP Version: 5.1.6
#
# Database : `?`
#

# --------------------------------------------------------

#
# Table structure for table `mainHubvariable`
#

CREATE TABLE `mainHubvariable` (
`name` varchar(128) NOT NULL default '',
`value` longtext NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

#
# Dumping data for table `mainHubvariable`
#

INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_avaliable_slots', 's:1:"1";');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_excluded_dates', 'a:2:{s:14:"field_apptdate";i:0;s:13:"field_timeoff";i:0;}');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_fields', 'a:2:{s:14:"field_apptdate";s:14:"field_apptdate";s:13:"field_timeoff";i:0;}');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_hour_from', 's:1:"9";');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_hour_to', 's:2:"19";');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_length_hours', 's:1:"1";');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_length_minutes', 's:2:"30";');
INSERT INTO `mainHubvariable` VALUES ('booking_timeslot_view_calendar', 's:22:"appointmenttimebooking";');

kenorb’s picture

I still can't see your 'booking_timeslot_forms' variable. It likes it isn't set and that's the problem.
Are you sure sure that you selected field from the settings?
Go to: admin/settings/booking_timeslots/form_settings
And in 'Field Names' section please select at least one field which is responsible for dates (datetime or date field).

smw’s picture

I've done everything you have explained, I then deleted the content types and started from scratch. Created a new content type called "sessiontimes" then created a date timefield. Then I opened up settings for bookings_timeslots and set the form and the settings as you have explained.

My only guess is that it is something to do with my view argument. Is there a way I can see yours/an example of the view that works.

I've tried everything but a clean drupal install, which isn't far away I feel.

Anything else you think it can be?

kenorb’s picture

http://xcomkids.xcomplete.com/
Can you send me e-mail through contact?
I'll give you some test accounts to test it.
And if you can send me yours, maybe I'll check what's going on.

smw’s picture

Hooray !!!

I fixed it.

I ended up creating an entirely new drupal site and combing through the settings. As it turns out, I think a bookings api module loaded from a previous setup was conflicting.

But I have loaded version 1.1 over dev and everything works as it is supposed to, I am very happy.

Thanks for your dedicated support in seeing me through this.

I will do my best to contribute to some documentation for setup.

again thanks.

Scott

kenorb’s picture

Title: Clicking "Book Now" opens Create Content Page (listing all node types) - Shouldn't it open the Created Nodetype for Booking? » Clicking "Book Now" opens Create Content Page (listing all node types)
Priority: Critical » Normal
Status: Active » Fixed

That's great.
If you can, you can create some documentation for proper setup. I'll appropriate that. Mostly I'm focused on functionality and documentation is not my good side (considering that English is not my mother tongue).
I'll add some additional warning, if mandatory settings are empty in database.

To summary
If you see 'listing all node types' after clicked on 'Book Now' and link looks like: node/add/0/... (with 0) that means your content type has been not recognized properly. Basically Calendar View and 'Book Now' need to be somehow connected to specified Content Type. If you don't have it in settings, module can just guess which content type you meant.
It's possible to make some more intelligent detection, if only one content type with datetime was found - that's the one, but user could have some old content type and he didn't create new one for booking purpose, so it's not good idea as well.
So basically it's problem of not configured settings (admin/settings/booking_timeslots/form_settings) or some Drupal conflict if settings are set, but are not in database.

If you need to check what kind of variables you have set, you can execute following query:

SELECT * FROM variable WHERE name LIKE "booking_timeslot_%"

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mach5_kel’s picture

Im having the same issue with the newest DEV. (Sept 24th). Goes to the create content page instead of directly to my specific content type.

Anyone else?

----------------

Update: On the settings page for this module dev version, I dont see where I choose the appropriate content type for when I hit the "book now" link. So, now i am not surprised it isnt choosing a content type.

I do see where I can tell it which date field to use. But not which content type.

wwwclaes’s picture

I also had the same problem with the Dev version. I think variable "booking_timeslot_forms" isn't set in the database. It may be set in some setups, but only if the module is updated from an earlier version - then the variable is converted from an old name of the variable.

kenorb’s picture

Status: Closed (fixed) » Needs work

You did already the update.php when upgraded from the older version?
Can you send me prv dump of your site environment that I can check it why is that?

wwwclaes’s picture

Status: Needs work » Closed (fixed)

No, I started with installing the Dev version.

I may be in deep water here, cause I just started out looking at your nice
module. However, I had the same symptom as #18.

A brief look at the code, indicated that calendar-day.tpl.php does a...

variable_get('booking_timeslot_forms', array());

...which is set in the release version in booking_timeslots.admin.inc by...

$form['form_settings']['booking_timeslot_forms']

...but that is missing from the Dev version. This is also reported by
#18 from an UI perspective.

wwwclaes’s picture

Status: Closed (fixed) » Needs work
shadowdknight’s picture

Hi,
I'm facing the same issue, any solution please?
Following are the dump:

booking_timeslot_avaliable_slots	s:1:"1";
booking_timeslot_excluded_dates	a:3:{s:14:"field_projdate";i:0;s:14:"field_taskdate";i:0;s:13:"field_rsvdate";i:0;}
booking_timeslot_fields	a:3:{s:13:"field_rsvdate";s:13:"field_rsvdate";s:14:"field_projdate";i:0;s:14:"field_taskdate";i:0;}
booking_timeslot_hour_from	s:1:"8";
booking_timeslot_hour_to	s:2:"18";
booking_timeslot_length_hours	s:1:"1";
booking_timeslot_length_minutes	s:1:"0";
booking_timeslot_not_avaliable	a:7:{s:6:"monday";i:0;s:7:"tuesday";i:0;s:9:"wednesday";i:0;s:8:"thursday";i:0;s:6:"friday";i:0;s:8:"saturday";i:0;s:3:"Sun";i:0;}
booking_timeslot_view_calendar	s:3:"rsv";

Thanks for the great module

mautumn’s picture

Version: 6.x-1.x-dev » 6.x-1.2
Component: User interface » booking_timeslots
Category: support » bug
Priority: Normal » Critical

This looks like a good module, but like users before me, I cannot get this to work. I have tried everything above, uninstalled, re-installed, dev and 1.2 versions. Every time I go to "book now" I get the full list of content types. Nowhere do I get to specify content types associated with BTS - just fields. I'm out of ideas.

Following are the dump:

booking_timeslot_excluded_dates  	a:5:{s:10:"field_date";i:0;s:22:"field_booking_datetime";i:0;s:14:"field_calendar";i:0;s:21:"field_registered_date";i:0;s:18:"field_year_started";i:0;}
booking_timeslot_fields 	a:5:{s:22:"field_booking_datetime";s:22:"field_booking_datetime";s:10:"field_date";i:0;s:14:"field_calendar";i:0;s:21:"field_registered_date";i:0;s:18:"field_year_started";i:0;}
booking_timeslot_view_calendar 	s:19:"room_booking";
booking_timeslot_view_calendar_date 	s:0:"";
booking_timeslot_view_calendar_profile 	s:0:"";

Thanks for the great module but unable to proceed.

jusyjim’s picture

same here... subscribing...

yskel’s picture

Same problem, subscribing. Here's my dump:

'booking_timeslot_excluded_dates', 'a:2:{s:13:"field_no_tour";s:13:"field_no_tour";s:15:"field_test_time";i:0;}'),
'booking_timeslot_view_calendar', 's:4:"test";'),
'booking_timeslot_length_hours', 's:1:"1";'),
'booking_timeslot_length_minutes', 's:1:"0";'),
'booking_timeslot_avaliable_slots', 's:1:"1";'),
'booking_timeslot_hour_from', 's:1:"8";'),
'booking_timeslot_hour_to', 's:2:"18";'),
'booking_timeslot_not_avaliable', 'a:7:{s:6:"monday";i:0;s:7:"tuesday";i:0;s:9:"wednesday";i:0;s:8:"thursday";i:0;s:6:"friday";i:0;s:8:"saturday";i:0;s:3:"Sun";i:0;}');

I believe my problem is the same as described by other posters - rather than linking to the add node for my specific content type (/node/add/[CONTENT TYPE NAME]/[DATETIME]) the 'book now' links to (/node/add/1/[DATETIME]), which maps to the general add page for all content types. If I then click the add link for the my date content type, I lose the DATETIME that was passed by the original calendar link.

I'm working on a smaller site that absolutely requires timeslot booking functionality, so I'm OK with doing something hackish and inefficient to get this working. The jquery snippet below gets the affect that I'm looking for by changing the 'book now' url to point directly to my date content type:

$(document).ready(function() {
      if($("div.calendar a")){
          $("div.calendar a").each(function() {
                $(this).attr('href', $(this).attr('href').replace('/1/','/test/'))
          });
      }
});
CinemaSaville’s picture

I have the same issue. Where would I put the above snippet?

kenorb’s picture

Status: Needs work » Needs review

Done some fixing.
http://drupal.org/cvs?commit=338194

Please test it (dev version).

Updated as well Installation instructions on Project page to make it more clear.

jusyjim’s picture

New errors and still same effect...

Here's what I did uninstalled the module, ran update. Installed the dev version of the module copied the tpl files over to themes just in case they were updated as well. Now the create content page still comes up and I get the following errors on the calendar view:
warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/hosv/public_html/we/sites/all/modules/views/includes/view.inc on line 1286.

and

warning: Invalid argument supplied for foreach() in /home/hosv/public_html/we/sites/all/modules/booking_timeslots/booking_timeslots.inc on line 156.

Frustrating but I'll keep coming back because this module is exactly what I need and worth waiting for.

--------------------------
Here's an addendum to this comment added after I played around some more:
I think it's the view that I cloned from the calendar that is having problem because I am not getting the error messages with the standard calendar. I'm still getting the create content page from the calendar page "book now: links that are formatted in this way /node/add/%252F2010-03-17%2008%3A00%3A00 .

Thanks in advance for any help.

Jim

kenorb’s picture

jusyjim:
make sure that your Views has calendar view chosen and you have proper arguments with selected field.
Just try it from default calendar view and follow installation instruction from the Project page (http://drupal.org/project/booking_timeslots)

jusyjim’s picture

StatusFileSize
new71.85 KB
new84.74 KB

Thanks kenorb,

Getting this message:
The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar.

Here are a couple of screen shots of my settings

kenorb’s picture

#31 try to add the same field into Fields list.
Something like: http://drupal.org/node/540804#comment-1990530

jusyjim’s picture

Checked and it's already like that.

kenorb’s picture

jusyjim: can you export and attach your calendar view?

randyrich’s picture

StatusFileSize
new13.52 KB

Hi , I wrote you an email yesterday.
I tried to follow all the steps but still get drupal-6.16/node/add/1/2010-03-14 18%3A00%3A00 as a link
I attached my calendar views as text file
thank you very much for your help
Randy

jusyjim’s picture

StatusFileSize
new2.67 KB

Hi,

I've attached my calendar view. Thanks.

randyrich’s picture

I downloaded the dev version, it took some time to understand what you meant. It works now I guess.
The book now link leadf me to the create content page of event with the following link address drupal-6.16/node/add/event/2010-03-17 19%3A00%3A00. Is that how it is supposed to work? Is there a way to link the book now to an existing confirmation page?
Thank you
Randy

kenorb’s picture

randyrich:
Yes that's correct. Datetime field is hidden when you have date in your URL address. When you submit, even is created. I don't understand what do you mean by booking to an existing confirmation page?

FurySting’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

So far I am not having luck with this module. I have tried starting over from scratch on it a few times with both releases.

I have never seen a 'booking_timeslot_forms' variable show up in variables yet. I get every other variable listed, but never 'booking_timeslot_forms'. Can you give me an example of what would be in that field? I will create it manually.

I am using the content type 'booking' for testing, but in the end I wanted to make 7 separate content types as booking calendars for 7 trainers at my school.

The content type is named booking.
The view is named calendar-booking.

I created view specific templates named...

calendar-day--calendar-booking.tpl.php

Which works.

Then modified the template to hard code in the content type.

//      $module_link = booking_timeslots_get_ctype_name(NULL, TRUE); /* generate content type link */
      $module_link = "node/add/booking"; /* generate content type link */

And that worked to make the "Book Now" links open the right content type. But after booking the time it still shows as available. So I figure it is using that content type it is failing to retrieve for checking the existence of rows as well. in the 'content_type_booking' table.

I have all of the settings in admin correct and in the views and it almost works but I'm starting to pull my hair out. It has been too long since I wrote anything close to this from scratch so any more help would be appreciated.

FurySting’s picture

@Randy #37

This module allows the user to "Book Now" which creates a new node of whatever content type you created for it.

If you want it to redirtect to a conformation page you could use the http://drupal.org/project/rules module then create a rule that fires on the creation of said node type. You can then add actions to that rule to do a redirect to a node you specify. So you could create a node that is a conformation page then redirect users to that page once the new "booking" node is created. If you want to go that route and you are not sure what I am talkign about, reply and I will make a step by step for you or something.

Or...

If you don't want to install rules, you could alternatly create a template for the node type your using above and add your conformation page HTML in that template, Then when the user adds the node it displays as a conformation page instead of showing the node information. Ultimatly you don't want the user messing with the booked node once it is created anyway, so while this way of doing it is a bit Gerry-Rigged it doesn't need any additional modules to do it.

Later,
Fury

randyrich’s picture

@FurySting #40
Thanks a lot for your quick answer. I gotta say I discovered drupal only two weeks ago and so far I only changed variables in PHP, so here is my lists of questions. I would like to go with your second option creating a template page. How do I set this up? Where do I save it and how do I connect it to the booking calendar? I understood it should contain the layout html and probably a dynamic text field for the booking time to appear and the submit button, is that right?
I really apreciate your help.
P.S. What is Gerry-Rigged?

jusyjim’s picture

kenorb, did you happen to see anything wrong after you logged in?
Thanks.

kenorb’s picture

jusyjim:
I've checked it now and this issue is not happen on your installation any more.
Your path after clicking 'Book Now' is node/add/custom_timeslot/2010-03-30%2012:00:00, that's correct.
Followed issue is related only that "Book Now" opens Create Content Page,
If your have different problem, please raise the new support issue with your problem description to make it clear.

kenorb’s picture

Jovean’s picture

Would manually inserting the "booking_timeslot_forms" field in the db resolve the problem (b/c I have it, too)? If so, what is the SQL for inserting that field (so that I can do it manually)?

kenorb’s picture

Jovean:
booking_timeslot_forms variable is a depreciated one. Currently you shouldn't find anywhere in the code.

Jovean’s picture

Ok, but then how do I resolve this issue?

kenorb’s picture

Jovean:
which issue do you have exactly?
can you send me some screenshots or url in priv?

jusyjim’s picture

From the calendar, If you click book now you go to a page such as /calendar/2010-03-27. From that page if you click book now the links are formatted like so: /node/add/custom_timeslot/2010-03-27%2010:00:00 and then are led to the create content page. Is that not the issue at hand? Please tell me I'm not illiterate!

Jovean’s picture

I have exactly the problem as stated in #49 - though the second url is /node/add/1/{date+time}. Of what do you need a screenshot?

kenorb’s picture

#49 jusyjim:
Yes, your link should point to Create Content Page of your custom_timeslot type (not listing of all node types as described in this issue), so it's correct behaviour.

#50 Jovean:
your link has '1' instead of name of content type, that's NOT correct. '1' means FALSE, because relationship between your Calendar view and Content Type associated with it couldn't be found.
Make sure that you have dev version from 11th March, enabled proper field from setting page and added this field into Calendar view.
If you still have this problem, please send me link to priv, I'll try to figure out why you have this problem.

jusyjim’s picture

Ok, that's what I thought... but it's going the create content types listing all content types so I am in the right place. You said you logged in and saw correct behavior, can you show me a screen shot because not matter what I do, whether logged in or not and no matter what role I'm in, I still show all types.

kenorb’s picture

jusyjim:
Ah, in your case it's different issue: #498600: Book Now link doesn't work when content type contain underscore
Your content type contain underscore, I don't know why I didn't see this before. It's fixed in dev, make sure that you have latest dev version.

jusyjim’s picture

I just want to thank you in public! Many kudos for your perseverance! Great module and I'm happy I got it working.

Thanks again!!!

Jovean’s picture

I installed the dev version, resaved all the settings (without changes, incidentally), and now it works. Thank you.

krutipatel’s picture

I have installed the dev version of this module and that's working well for me Thank you.

kenorb’s picture

Priority: Critical » Normal
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sachin475’s picture

StatusFileSize
new65.82 KB
new34.63 KB

i am also having same problem. When i click on "book now" option it opens create content page.
i have entered proper field in setting page.
I want to know that when i click on "book now " should it go to create custom time slot page and how ??
i have attached some screenshots with this to clarify my point.

this is my url
/node/add/1/2011-02-01%2010%3A00%3A00

which display add/1 means connection is not made

GBain22’s picture

I have the same problem as #59 using version Timeslots 6.x-1.2 and the resulting url I get from "book now" is /node/add/1/2012-04-27%2010%3A30%3A00 - so obviously the "1" should be "booking" as this is my content type.

Cheers,
Garry.