Possible to have "room type name" in ical feed?

More
5 years 10 months ago #11662 by groovezog
Hi,
I've managed to customize the ical feed to display reservations in a Google Calendar. I'm able to find first name, last name, etc. inside of the $reservation array in the file:
/plugins/solidres/ical/components/com_solidres/controllers/ical.php
...but I'm unable to find the "room_type_name", or the room number that the guest is assigned to. (This would also be the room number found in "Room/Extra Info" under a guest's reservation: cloudup.com/cP4Tod7Exv0 )

Could you provide a hint or point me in the correct direction for adding this data into the ical feed please?
Thank you!
~J.

Please Log in or Create an account to join the conversation.

More
5 years 10 months ago #11665 by solidres
Hi,

The room type name is stored in a different table "#__sr_reservation_room_xref" therefore you need to query from it to retrieve the room type info, each reservation could have one or multiple assigned room types.

Regards,
The following user(s) said Thank You: groovezog

Please Log in or Create an account to join the conversation.

More
5 years 10 months ago - 5 years 10 months ago #11697 by groovezog
Replied by groovezog on topic Possible to have "room type name" in ical feed?
Great. I got it. In the file:
/plugins/solidres/ical/components/com_solidres/controllers/ical.php
...in the function:
getReservations()
...I changed the select query from:
->select('a.*, a2.email AS asset_email, a5.name AS room_name')
...to:
->select('a.*, a2.email AS asset_email, a5.name AS room_name, a3.room_label AS room_label')

I was then able to access room_label in the $reservations array.

Thanks for the help!
Last edit: 5 years 10 months ago by groovezog.

Please Log in or Create an account to join the conversation.

More
5 years 10 months ago #11698 by solidres
Hi,

It is great to see you got it!

We will consider adding support for it soon.

Regards,

Please Log in or Create an account to join the conversation.

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?