Currently I'm working on an integration of the booking api with eventbooking and ubercart. Therefore it would make sense if we can turn multiple node types into a resource.

The main problem with the current approach is, that you can not have multiple resources with different CCK fields. For example you have an application for a hotel. Normally you want booking tables and hotel rooms. Both has a number for identification. But a hotel room has also a number of beds or has a mini bar and so on. The restaurant table has a number of seats and nothing more.

Now it would be great if we can assign different node types to be a booking api resource. At the moment this is hard coded.

The solution for example can be a field in the node type form, which enables the node type to be a booking api resource or not.

Unfortunately I do not understand the whole code, otherwise I could implement this feature. It could not be so complicated. Are there any other persons interested in this?

Comments

Anonymous’s picture

Yes, this would be a nice feature. Bookings API is restricted to a single resource type because it was easier to write in the first run and I wanted a functional "first release of 3.x" as fast as possible. I know that there are a couple of limitations :(

I'd be very interested in seeing a more general approach - but I currently dont have the time to write it. I will do this some time - but until this joyful day I'll gladly take any patch provided :)

ParisLiakos’s picture

customweb, thats a very good idea and i am very interested!

are you still on this?

i could help you if you want..

customweb’s picture

I have developed such a prototype (Ubercart & Booking API). For this prototype I do not need this feature. So I do not implement it.

stevenjay’s picture

customweb, can you share how you integrated Ubercart & Booking API? I need to integrate Ubercart -Marketplace with Booking API. It would be great to know how you approached it and I could help with any improvements.

hunziker’s picture

Hi mettasoul, see http://drupal.org/sandbox/hunziker/1089042. This is the point to start. Perhaps you need some other things. It depends on your requirement.

asb’s picture

see http://drupal.org/sandbox/hunziker/1089042.

"Page not found
The requested page could not be found."

hunziker’s picture

The project has moved to Ubercart Rules.

doublejosh’s picture

subscribing!

doublejosh’s picture

Trying to get an idea about how much effort this would take...

Looks like BOOKINGSAPI_RESOURCE_TYPE would be to be moved into an array and the code utilizing it would be need to moved into checking for all types which would need to be finessed in the mySQL pieces.
Also, a checkbox would need to be added to content type admin pages or perhaps a list of node types on the Public Bookings admin settings page.

Apparently developer-x is working on this? http://drupal.org/node/1027268#comment-4010652