Elxis CMS Forum

Extensions => Components => Topic started by: kelvink_59 on February 27, 2013, 01:41:37

Title: IOS Hotel result
Post by: kelvink_59 on February 27, 2013, 01:41:37
Hello,
i m new on this forum.
I have setup a demo portal with the advanced Ios reservation  and location filter on the middle (user2)
I wonder how can i setup a dedicated fixed page to any single Hotel Selection after having  from the variuos filters.
Today the results go directly in "same page", while i d like to separate as one pager for to search and select the hotel and a second page where the hotel selected appears,and possibily this page without siderbars.
Being a component and not a module I dont know how to address it inside the template positions.
Any idea?
many thanks
claudio

Title: Re: IOS Hotel result
Post by: datahell on February 27, 2013, 09:58:29
You want to display the module on a specific page only, or on all pages except a specific one.
You can do it in 2-3 ways, I will write you how I would do it.
Open your template's index.php file find the spot you load the specific module and add an if statement like that:

Case 1: display module on specific page only
Code: [Select]
global $option, $task;
if (($option == 'com_reservations') && ($task == 'hotel')) { //we are in the hotel's details page, display the module
     mosLoadModules('position name here', -2);
}

Case 2: display module on all pages except a specific one
Code: [Select]
global $option, $task;
$showmod = true;
if (($option == 'com_reservations') && ($task == 'hotel')) { $showmod = false; }
if ($showmod) {
     mosLoadModules('position name here', -2);
}


Note 1 regarding the under development IOS Reservations 4.0 for Elxis 4.x:
IOSR Hotels sets 3 PHP constants, for country (IOSR_COUNTRY: 2-letter ISO code), for location (IOSR_LOCATION: location id) and for hotel (IOSR_HOTEL: hotel id).
You know that you are on a hotel page if IOSR_HOTEL has been defined. More over you know the exact hotel the user see from the value of the IOSR_HOTEL constant.

Code: [Select]
if(defined('IOSR_HOTEL')) {
    echo 'You see the hotel with id: '.IOSR_HOTEL;
}


Note 2 regarding the under development IOS Reservations 4.0 for Elxis 4.x:
IOSR Hotels includes filtering options in location and search pages, so you don't need separate modules for that.
Title: Re: IOS Hotel result
Post by: kelvink_59 on February 27, 2013, 12:33:51
Many thanks very helpful!
Version 4 wll be great.
Ciao Claudio
Title: Re: IOS Hotel result
Post by: kelvink_59 on February 28, 2013, 17:51:27
Dear Datahell,
I am very sorry but my knowledgment of PHP is not so good! so...you have to be patient !  :) 
I have tested your PHP codes but havenot fixed yet the issue...

I try to explain better because i think the solution is simple... the problem is that I dont see it!

let give me the example.......try to go to my demo site: 
www.travelpackdemo.it
if you click on any HOTEL NAME  (including Featured in the left eg: hotel Moz Art)  you get the hotel response detail "appended" on same page.

I would like to have the response detail on a single page for a single hotel, starting from top of USER2.
A valid example is the  website:  http://wyngateresorts.com  where each hotel get is placed on a dedicated page.

I know that IOS are component and not modues, how to address then?

many thanks
claudio
Title: Re: IOS Hotel result
Post by: datahell on February 28, 2013, 19:46:24
1. In Elxis configuration you have enabled "SEO basic"  which is deprected. I strongly suggest you to use "SEO PRO".
2. You haven't created a menu item pointing to IOS Reservations. So, IOSR gets the Itemid of site's frontpage and so displays the modules assigned to it.
3. If you want to display modules on IOSR frontpage set them to position "restop" (IOSR 3.x frontpage documentation (http://wiki.elxis.org/wiki/IOSR_Frontpage))
4. You have installed Elxis inside a folder (tourism) which is not recommended. Better use a sub-domain (http://turism.mysite.com)