Active
Project:
Agreservations
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2012 at 12:12 UTC
Updated:
20 Sep 2016 at 10:09 UTC
Jump to comment: Most recent
Comments
Comment #1
zeezhao commentedOk. Kind of got it working, although a few bugs/errors which I will post separately.
Also will have to decide if can be used for base for this kind of reservation, as need to add joruneys and distance calculations etc using location/gmap & computed_field modules etc.
Comment #2
zeezhao commentedTrying to see if can be used, so added location & gmap modules etc. Added a "From" and "To" location fields on Reservation content type to indicate Journey From/To.
When trying to create Reservation, and press Save after filling fields, I get:
@agill - please does this mean that we can't add fields to Reservation?
I am using drupal 7.17 with latest devs agreservation (2012-10-10 -- 7.x-2.0-beta3+5-dev), ubercart ( 2012-11-21 - 7.x-3.2+53-dev) , entity (2012-10-24 -- 7.x-1.0-rc3+11-dev).
Comment #3
agill commentedi just did a quick test with a simple text field that i added to drupal 7.15 install with agreservations enabled.
I did not get the described error. Also the error does not really sound like it has to do with agreservations.
Are you using the locations module? and did you add the fields as entity reference fields?
For your use case i suggest using the following:
I suggest creating a separate contenttype as node-contenttype using the following modules:
Address Field, Geocoder, geoPHP, Geofield, Geofield Map
and maybe openlayers to have the points visible on a map.
And then adding an entity reference field to the reservations contenttype
Why do i suggest node-contenttype and not a separate entity? -because currently
openlayers proximity works best with node based geofields and not yet with geofields attached
to other entities which are not nodes (nodes are indeed entities, but lots of modules still have code that addresses node fields, the old way)
thats all that comes to my mind.
Taxi-reservation is an interesting use-case and i would like to see it in action ;-)
Comment #4
zeezhao commentedThanks for your reply. I had got agreservations to work first without any changes. It was only after then that I added new fields to the Reservation content type via:
admin/structure/types/manage/agreservation/fields
Yes, I am using location module (2012-09-03 -- "7.x-3.0-alpha1+1-dev"), gmap (2012-11-04 -- "7.x-2.2")
I also use computed_field module to add a "Distance" field to the Reservation. It is calculated using longitude/latitude and location function earth_distance( )
edit:
Note that I was able to amend an old reservation created before adding From/To locations fields. That did save correctly - so location/gmap works. So issue is when a brand new reservation is created using:
node/add/agreservation
Comment #5
agill commentedadding the same fields you added to reservations contenttype to another
contenttype and then inserting a new node using node/add/anothertype
-have you tried that?
Comment #6
zeezhao commentedYes, I did that too. Sorry - I have found out the issue - was due to a bug in the computed_field I am using, and only evident on brand new nodes.
Some immediate things to think about:
1. when I use node/add/agreservation it means user has to choose specific unit to reserve.
However, when done via your booking block, it picks a generic unit. But no way of telling how to allocate?
2. How to edit order/reservation when in cart?
3. Sometimes reservation created using node/add/agreservation can be disconnected from cart, especially if user has to edit reservation. [edit: i.e. "Create Order" link disappears and hence user can not add it to cart and hence pay, even though reservation exists admin can.]
Comment #7
zeezhao commented@agill - please whenever you have a moment, let me know your thoughts on the issues in #6. Thanks
Comment #8
Yorgg commentedI also get this without location, gmap, agreservation or ubercart. I get 8 of those when running importing fields with nodes but the error is exactly the same.
Comment #9
zeezhao commentedIn relation to #8, as mentioned above the error has nothing to do with agreservations. Its probably related to one of your newly created fields or a module associated with those fields.