Thursday, November 24, 2011

Agreservations

24/11
Agreservations is one of a number of reservations modules that are available to Drupal 7.  
Discovered it today and set up a site.  The first thing that is required is Ubercart (and all that goes with it).
Once duly set up, there are a few modules that you need to go with agreservations.  These include:
Internationalization  - not that easy to find as in agreservations, the missing file is ' i18n ' ???  Search in Drupal still doesn't show it up, but there it is.
References - much easier although a little confusing as there are a number of variations that are required.
Calendar - Thought this may not be needed - or worse would cause a conflict as in the admins blog he (or she) indicates that there is a fork and that its no longer required.
Variable - Easy to find and install.
Went ahead with the installation.  Seems to have gone OK.
So how does it work?  There are a number of new content types, but no new admin menu items (as with UC hotel and Rooms).  Will now wait to download the very large installation video.

25/11
Suggestion made by on the agreservations installation video page was to modify the php settings found in the sites/default directory to allow for longer timeout times.  I think this is a good idea as a standard as it avoids that horrible 'fatal error' when you're trying to activate a module.
The initial setup of agreservations is proving more difficult than anticipated - I got that dreaded fatal error when I tried to look at the and I now have a strange PDO:construct error.
This may be because I did not follow the instructions regarding the order of installing modules (not sure how this would effect things) or it may be because there is some stuff that I have not set up.  It does mean that one needs to be fairly careful in the initial installation.
...just had a major problem (not sure why) - when I installed yesterday, I copied some stuff off another localhost site and  I now seem to have a lot of that content - there must be some strange link or other.  time to restart the process from scratch using a clean installation with clean modules!

From Scratch:
Install Drupal 7.9
Install Ubercart needs:


Recommended:

Problems with installation - fatal error related to ctools when installing ubercart.  Total re-install but this time instead of copying Ctools and views and activating, installed them both individually.


Following directions  installed agreservations.  Note - had forgotten to change the settings file.  Changing it now caused errors. (wonder if these are related to my previous problems!)


Setting up the installation:
Set up store information under store configuration (especially currency)
UNDER ADD CONTENT : 
First create a category type
Then create a timeframe
Then create a rate type
Then create a unit type
From the video he then does something a little mysterious:  He goes to the store - classes and deletes agreservations_unittype, and then generates it again using the same name for Class ID and Class Name = unit type.  Net result is a number of errors, but after that when you re-edit your unit type and add prices.
Once done, one can create a couple of rooms.
Then went to calendar
Fatal error: Class 'calendar_plugin_row_node' not found in C:\wamp\www\agreservations\sites\all\modules\agreservations\agres_views\includes\agres_views_plugin_row_node.inc on line 24
Oh no!!  Don't have a simple solution to this one. Raised a bug report.
Andreas came back very quickly with couple of suggestions:
Tried re-installing calendar, no joy.
Sent him the sql file and a list of modules.  Hold thumbs!
28/11


Turned out that my version of the Calendar module was too old.  Updated this to Version.
Fatal error went away, but now there is a new one:
Notice: Undefined index: access in agres_views_menu_local_tasks_alter() (line 713 ofC:\wamp\www\agres\sites\all\modules\agreservations\agres_views\agres_views.module).
Must admit to losing a bit of confidence at this stage - but Andreas is still talking to me.  


29/11
Wants me to check that all of the other modules are up to date.  It appears that asking Drupal to do this is haphazard so I will do it manually!:


Internationalization : must have been updated since I visited there a few days ago! Version 7.x-1.2
Views 7.x-3.0-rc3  Up to date
Ubercart 7.x-3.0-rc2 Up to date
Rules 7.x-2.0 up to date
Variable 7.x -1.1 up to date
Entitiy 7.x-1.0-rc1 up to date
Token 7.x-1.0-beta 7 up to date
colorbox 7.x-1.2 up to date
references 7.x-2.0-beta3 up to date
date 7.x-2.0-alpha4 up to date
calendar 7.x-3.0-dev up to date
Ctools 7.x-1.0-rc1 up to date
agreservations 7.x-1.0-alpha2 up to date


Turns out that there is an even more update version of Date - Alpha5.  Installed this and the error messages went away.  Now I can see the calendars for Week and year.  There is still a problem with Month and a template error in Day.  But I do get the feeling that we are getting there.


Thanks for all the support from Andreas, hopefully we can get this working.


30/11
The plan is ultimately to put together a site that will allow me to let a number of accommodation providers advertise.  From what I have seen in the last few days, I should hopefully be able to do this by making modifications to views to enable it to only display the calendar of a specific provider and to allow the public to only book this premises when they go to that page, but also to allow the user to have a 'trolley' of accommodation that they have chosen.


1/12


Great news - Alpha 5 seems to be the solution to more than one problem.  There is an Alpha5 version of Agreservations.  


Installed and finally the calendar is visible in all windows.  Next plan is to go through his more detailed installation videos to make sure I am clear on how the software works.
3/12
There is nothing quite like sleeping on a problem!  Now that the calendar is working, I have been unable to add a room to the cart even though when I add the room, it shows as booked on the calendar.  There is a description in one of Andreas's videos that tells you how to set up room rates, and this is where the solution eventually lay.  Here is the bug report that I submitted on the subject.


The error that you get is 

<Price Rate> is not a product Unable to add to cart

"This is and issue that I think you may be aware of but is useful to mention for others trying to resolve problems.


When setting up rates in agreservations, it is important the the ubercart product information is shown on the setup form. If it is not, it means that agres_rate has not been setup in the ubercart classes.
This problem shows itself when adding a room to the cart. You get an error saying that " is not a product Unable to add to cart"
There is a simple solution to this - go to store - products - manage classes. If agres_rate is not there (which is was not for both my clean and my previous installations), then it needs to be added:
ClassID : agres_rate
Class nam: agres_rate
description : agres_rate
After this, there should be the ubercart information under the price rates.