Hi.
I have a huge problem making uHotel Booking search in every property type.
I have many property types, like Villas, Cottages, Exclusive Villas, etc etc... So I was struggling to figure out why it only returns specific accommodation places every times, while it never returned other ones, although I had bouble and triple checked that their availability tables were set fine.
I just realized that it has to always search in a specific property type, and even when one is not set through the hidden field <input name="property_type_id" value="" id="property_type_id" type="hidden"> of the search form, it returns only the places of the first property type's category.
Is there a way to make it search in ALL property types when none is set?
uHotel always has to search in a property type
Moderator: alexandrleonenko
-
- Junior
- Posts: 17
- Joined: Apr 1st, '18, 23:17
-
- Junior
- Posts: 17
- Joined: Apr 1st, '18, 23:17
Re: uHotel always has to search in a property type
Problem is line 1757 in Rooms.class.php
I suspect there is a bug somewhere around there, as if you at that place, it will never be empty, because there is other code setting it forcefully to the property type of the first (or the default) property in hotels.
Code: Select all
$hotel_where_clause .= (!empty($property_type_id)) ? 'h.property_type_id = '.(int)$property_type_id.' AND ' : '';
I suspect there is a bug somewhere around there, as if you
Code: Select all
echo $property_type_id
-
- Site Admin
- Posts: 6081
- Joined: Jan 7th, '09, 23:18
- Contact:
Re: uHotel always has to search in a property type
So what the problem? If it's empty, it doesn't generate error.
-
- Junior
- Posts: 17
- Joined: Apr 1st, '18, 23:17
Re: uHotel always has to search in a property type
Would you like me to PM you with info on my site to see the problem in action?
Like I said, the script always returns houses from one property type... I know it's like that by design, as a tab is chosen at any time. But there might be a case where one might need to search among ALL property types...
IMHO for the next update you should implement the first tab of the search box to be the All, and then it should generate the rest tabs by going through the relevant table...
Like I said, the script always returns houses from one property type... I know it's like that by design, as a tab is chosen at any time. But there might be a case where one might need to search among ALL property types...
IMHO for the next update you should implement the first tab of the search box to be the All, and then it should generate the rest tabs by going through the relevant table...
-
- Site Admin
- Posts: 6081
- Joined: Jan 7th, '09, 23:18
- Contact:
Re: uHotel always has to search in a property type
Thanks, we'll check the possibility to add "All" tab.