Closed (fixed)
Project:
Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals
Version:
7.x-1.x-dev
Component:
Rooms Booking
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2013 at 16:35 UTC
Updated:
9 Nov 2013 at 10:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ben.hamelinWorking on this today, hoping for some feedback regarding next steps.
During the "Create new profile" process, the "owned by" user association field is hidden.
This creates a new `commerce_customer_profile` record with uid = 0.
At this time a new `rooms_customers` record is created as well, referencing the profile id
The booking process resumes, the new "profile" is selected, and the booking is created.
At this point we have a new `commerce_order` record, with uid = [ADMIN_UID]
I believe this is the point where we need to step in. With no valid link to the customer profile, the order billing info is left empty.
Manually updating the `field_data_commerce_customer_billing` profile_id reference fixes the issue.
I believe if we get this value to the order creation process we should be ok.
Comment #2
ben.hamelinBased on this post: http://www.drupalcommerce.org/discussions/2615/programatically-create-or...
Can we add the following to rooms_booking.admin.inc line #1132
This would require adding 6th argument to rooms_booking_create_order(), namely the $profile_id
Comment #3
ashzade commentedWe are also very interested in a solution for this problem. We tried work arounds but it looks like this functionality is a requirement.
Comment #4
ben.hamelinpatch attached as described in #2. Creating new booking, and editing existing booking worked fine.
Comment #5
ben.hamelinSorry, that last patch was backwards. Also updated to reflect comment #
Comment #6
ashzade commentedBen, you've done it! It works :) This should really be pushed up to the next release as it's a vital feature.
Comment #7
ronald_istos commentedBen - will look into this hopefully today! Thanks for the work.
Comment #8
ben.hamelinashgotti, you are welcome. Glad to have a potential solution in place and that it helped you out!
Ronald, my pleasure, glad to help!
Just finished updating the DB to add the relationships as needed.
Here's the PHP I used, potentially helpful for @ashgotti and others, also I could see this in an _update function for a future release?
Comment #9
leducdubleuet commentedI applied the patch in #5 manually and it is solving this issue!
Thx a lot to ben.hamelin!
Comment #10
ronald_istos commentedcommitted - thanks Ben and all!
Comment #11
ronald_istos commentedComment #12
wahavi commentedSorry to open this old issue, but the issue exists in Rooms 1.15, Drupal 7.69.
To reproduce the issue:
- click on bookable day in calendar (/admin/rooms/units/bulk_unit_management)
- click on link: Create @booking_type
- choose existing customer (or create new)
- save booking
- navigate to bookings views: /admin/rooms/bookings
- search for the booking now created (i.e. set booking_id order to descending)
Find that the recently created order/booking has order_id = 0, and customer profile url with wrong id (although the commerce customer HAS an id which is different from this)
Please take a look at it if you have time.
Thanks for you help!