Use case: a customer asks for a room by phone. The hotel manager provides to book the room and then manually create an order, adding a "line item" to describe the just booked room.

I was able to create manually the order and to add a "Room booking" line item, but nothing let me refer the room or the booking.
Indeed the line item seems incomplete (see attached image).

Is this the rigth way to cover this use case? Is there anybody that has successfully approached this issue?
Thanks,
Grazio

Comments

ronald_istos’s picture

Ciao Grazio,

I am afraid it is not going to work that way. You would have to create a Rooms Booking Line item that has to be populated with all the room booking information and there is no UI for that.

The correct way to do this given the current way Rooms integrates with Commerce is to create a booking from rooms/booking/add and on saving that booking we should create an order representing that booking. Currently that is not possible. Right now when we do a booking manually we do not related it to an order in Commerce - the thinking behind that being that Commerce simply handles payments made through the web.

However, it is something that can be done with just a bit of code. On saving the booking we just need to create the line item, relate it to an order and save all of that using the Commerce API. You would then need to worry about what happens when booking details change (do we update order details or do they remain the same, etc).

Let me know what you think and maybe we can get something like this implemented sooner rather than later.

grazio.panico@gmail.com’s picture

Thank Ronald
It is very close to what I was thinking as a work around.
More precisely, i think the better way should be to register inside the line item a reference to a rooms booking (this should assure consistency)

I'll have a try and inform you about.

Thanks for your great work

Grazio

ronald_istos’s picture

Booking point to orders (look at DB table), so I think we can use that instead of pointing to line items. The problem is that only happens when you have used the commerce checkout process and not when you are just doing a manual booking. If you could spend some time on that - that would be great.