Elxis CMS Forum

Extensions => Components => Topic started by: jesusto on January 20, 2014, 14:16:28

Title: IOSR4. Get results from different cities?
Post by: jesusto on January 20, 2014, 14:16:28
Hi,

I´m trying to sell the system to an hotel chain that has several hotels in different cities (an even countries). Is there a way to look for them all from the search module and get results like normal destination, with filtering options, sorting, etc?

Thanks a lot in advance.
Title: Re: IOSR4. Get results from different cities?
Post by: datahell on January 20, 2014, 19:31:09
You want the hotels to be listed in the search module? If this is the case yes, this can be done. Actually the search module can be modified a lot, the best option is to develop your own search module the way you want it. IOSR accepts many different inputs via GET or POST.

Search parameters supported
hid : hotel id
lid : location id
flexlocation : 0/1 flexible location search
accid : accommodation type id
hoid: hotelier id
stars: hotel's stars/keys (0...5 for stars, 10...15 for keys)
lastmin: 0/1 last minute booking
title: hotel title (full or part)
keyword: Keyword to search within hotel's description
country: Country 2 letter iso code
facs: comma separated facility ids
Title: Re: IOSR4. Get results from different cities?
Post by: jesusto on January 20, 2014, 20:04:58
Sorry, I mean through the hotel search module...

For example get all the hotels of an hotelier (or from several cities I choose) available for a date although they are in different cities.

Getting the results in a page like locations one.

Is that possible?
Title: Re: IOSR4. Get results from different cities?
Post by: datahell on January 20, 2014, 21:00:05
The search library supports search with any of the above criteria plus the standard ones. But the current implementation is bind to locations page so in order to see the results you must always set a location. The location can be only one or, if you set the flexlocation parameter to 1, its near locations too.

Near locations for flexible search are:
1. Sub-locations to the chosen main location
2. Locations of the same tree level as the chosen location (except if its parent is the country root).

Example
Let's say we have this locations tree:
Country
    - A
    - B
        - C
        - D
             - E
             - F
If you perform a search on location D with flexlocation = 1 then search results will contain hotels for locations: D, E, F and C
If you perform a search on location C with flexlocation = 1 then search results will contain hotels for locations: C and D
If you perform a search on location E with flexlocation = 1 then search results will contain hotels for locations: E and F
If you perform a search on location B with flexlocation = 1 then search results will contain hotels for locations: B, C and D (not for A as its parent location is the country)
etc...

So, it depends on how you have set your locations tree to do what you want.

   
Title: Re: IOSR4. Get results from different cities?
Post by: jesusto on January 20, 2014, 23:08:46
Really great explanation, Datahell, can´t be more clear.

The ideal thing will be listings not bind to cities but perhaps I have found a solution...

What about creating a new fake city called HOTELCHAIN as parent of all the rest of cities where there is a hotel... so with flexible option checked and hidden it will do the trick, won´t it?

Anyway I think there is something not completely correct if you don´t use real distances for nearby...

Imagine these two real cases in my country:

1)

I have 2 cities (B and D) 5 miles away, but one belongs to a province and the other one to other, so

- A
     - B
- C
    - D

Although you mark flexible option looking for city D you will never get hotels in city B.


2) Now I have 2 cities in the same province but very very far away (160 miles).

If you mark flexible you will get results you are not interested in for sure...



Just my 2 cents, I now it is very difficult to take into account so many needs.

THANKS A LOT!!









Title: Re: IOSR4. Get results from different cities?
Post by: datahell on January 20, 2014, 23:19:19
Yes I know. IOSR can't know how close or far these cities are. It is smart but it has machine's intelligence, not human's. So it looks the locations tree structure to determine their relation and then decides which one to put together as nearby locations* for the flexible search. If you have set up your locations nicely you will also get nice results.

*Note: Nearby locations on the side column also takes under consideration locations coordinates and calculates the exact distance between them. To reduce CPU load it saves the calculated travel data in database table elx_res_travel