Elxis CMS Forum

Extensions => Components => Topic started by: juanon on May 11, 2015, 13:07:38

Title: IOSR, please help with new module
Post by: juanon on May 11, 2015, 13:07:38
Hi,

I´m developing two custom modules for IOSR latest version.

Can anyone please tell me how to get the hid (hotel id) for the current page the user is in, and the lic (location id) for the current page the user is in?

I miss some kind of documentation for developers (not API documentation), can it be found anywhere?

Thanks a lot.

Title: Re: IOSR, please help with new module
Post by: datahell on May 11, 2015, 14:33:39
IOSR Hotels sets the following PHP constants for the purpose you want (they are written in the manual).

IOSR_COUNTRY
The country 2 letter iso code ("gr", "it", "fr", etc...)
Available in country, location, hotel, search pages (if search is submitted).

IOSR_LOCATION
The location ID (lid, integer)
Available in country, location, search pages (if search is submitted).

IOSR_HOTEL
The hotel ID (hid, integer)
Available in hotel pages.

Usage example
$hid = (defined('IOSR_HOTEL')) ? (int)IOSR_HOTEL : 0;
if ($hid > 0) {
    //you see a hotel
}
Title: Re: IOSR, please help with new module
Post by: juanon on May 11, 2015, 15:09:40
Thanks!!

It works great.

Regards