Closed (fixed)
Project:
Availability Calendars
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2009 at 23:31 UTC
Updated:
13 Jan 2011 at 21:20 UTC
Thanks for the module.
Is there a way of automatically setting the dates which are in the past to Fully Booked? Or do you have to manually set the dates every day?
Comments
Comment #1
rorymadden commentedOk so I'm not very good at this. I've made a first attempt by copying a module that does this (uc_hotels) but the code below doesn't work.
Any ideas? Do you need to update the drupal core database to let if know that it needs to run this function when cron is run?
Any help is much appreciated!
Comment #2
rorymadden commentedComment #3
rorymadden commentedFor those of you who are interested I have used the following code. It might not be pretty but it works.
Comment #4
rorymadden commentedActually the above code causes my cron to fail. Anyone have any ideas? I've tested the code separately and it seems to work.
Any help appreciated.
Comment #5
rorymadden commentedOk. Trial and error. This works now. But I still have my node id hardcoded into the Insert statement.
Comment #6
nicholas.alipaz commentedI have implemented a similar feature based on your needs. Instead of altering the previous dates' data I am simply ignoring each dates data from the theme level and outputting them as booked. This means hook_cron is unnecessary and for historical purposes we could potentially get to the data if needed.
http://drupal.org/cvs?commit=471802
There are now options to enable the feature both within the node (per node setting) or from admin page (sitewide setting).