Elxis CMS Forum

Extensions => Components => Topic started by: datahell on April 23, 2016, 19:11:16

Title: IOSR Hotels v2.3
Post by: datahell on April 23, 2016, 19:11:16
Just for your information: an updated version (v2.3) of IOSR Hotels (https://www.isopensource.com/software/iosr-hotels.html) will become available in the next days.
Title: Re: IOSR Hotels v2.3
Post by: wieyoga on April 25, 2016, 07:14:44
Wow great news,

there is another issue for default rate that we set in IDR if the price more than IDR 10,000,000 the price become IDR 9,999,999.99

If consider, please fix it in this version as there is few 5 star hotel & villa price more than IDR 10,000,000
Title: Re: IOSR Hotels v2.3
Post by: juanon on April 25, 2016, 13:38:09
Hello,

Perhaps some of my prayers will be heard?

THANKS

-------------------

Hi Datahell,

Regarding next IOSRhotels version I´m waiting so bad I want to remind you about my need of a "non bother the hotelier, please" option ;)

- I need autocancelation if the customer ask for it (and he is in time, of course), without hotelier intervention. Perhaps a register can be written in logs to mark that.
- I need the reservations not paid to autocancel in 5-10 min (Now it is only working with full days).
- So it will be great that a user can book a maximum number of rooms in one single operation.
- I think emails shoud be sent after payment only... you have explained how the system works but I think it is something strange, mate. Booking and appointment scripts I have worked with of course do a "temporal reservation" during the booking process but items are not really booked and emails are not sent till the user makes the payment or choose a non online payment like bank transfer and confirm.

These are the features I need so bad to start my business and for whom I´m waiting for. I will be a happy man just with that!!
Besides I have some other ideas (some of them taken from other users in this forum) and, I do insist, for me are not so important. Anyway I left them here:

- A beautiful slider with images and transitions in hotel pages, similar to iosslider or this one: http://bookingarab.com/reservations/hotels/makkah/38.html
- Logo field and banner field for each hotel to show a logo and a banner for offers/deals. They will be shown in hotel page if the hotelier want to and they can be changed anytime they need.
- Filter also for room features in location pages.
- Strikethrough prices with new ones and "only x rooms left" messages also in location pages. I think it is much better for marketing.
- Show a module in hotelier panel to leave notes, or even better personal messages between hoteliers and admin.
- Hotelier login panel homepage could be customizable to show rooms calendar (of the first hotel if he has more than one), charts, and so on. Hotels I know prefer to see rooms calendar always...
- Google Map with All hotels also in a flexible destination.
- Pictures for extras and a more flexible system. What about if I only have 5 bicycles to rent?
- Validation for user form fields.
- Price always visible in checkout page, autoscrolling it with javascript or something like that.
- Non refoundable and discounts per room and season not per hotel.
- Different prices for the same room with and without meals.
-... and the even more difficult, implementation for some channel manager like myallocator to bring in hotels used to work with booking.com and so on.

I know I´m asking for too much, please don´t say no to all of them :)

I still haven´t used IOSR hotels in a production site but I´m willing to pay again if you consider these features deserve a new big version.

Waiting for your answer, mate.

As always, thanks a million.
Title: Re: IOSR Hotels v2.3
Post by: datahell on April 25, 2016, 23:10:55
Version 2.3 is a small update in order to support some specific features. Most probably a major update will follow soon (v2.4). I will read more carefully your requests tomorrow to see if I can implement anything in v2.3.

IOSR Hotels v2.3 requires IOS Reservations 4.3+ (mostly because of SMS library update).
IOSR Cars v1.1 requires IOS Reservations 4.3+
All IOSR software family was updated.
Title: Re: IOSR Hotels v2.3
Post by: datahell on April 26, 2016, 20:56:00
- I need autocancelation if the customer ask for it (and he is in time, of course), without hotelier intervention. Perhaps a register can be written in logs to mark that.
OK. I work on it right now. I added a configuration option to select what to do on reservation cancel: just notify the hotelier or delete the reservation?

- I need the reservations not paid to autocancel in 5-10 min (Now it is only working with full days).
Cannot be done because these checks run once per day. To do so I must set these checks to run every 5 minutes which is a very bad idea as will slow down IOSR a lot.

- So it will be great that a user can book a maximum number of rooms in one single operation.
What do you mean? You can already do so.

- I think emails should be sent after payment only... you have explained how the system works but I think it is something strange, mate...
No, this is a bad idea. You will not get notified about unpaid reservations and you will end with no availability of your rooms.
Title: Re: IOSR Hotels v2.3
Post by: juanon on April 26, 2016, 21:50:17
Hi, thank you.

- THANKS A LOT FOR THE FEATURE.

- Then would you tell me how to hack Elxis to achieve this, please? I dont want someone to book a lot of rooms choosing offline payment card method and never give the
card data.... rooms would´t be available till next day....

- I don´t think so. If I have 10 available rooms anyone can book them all in a single operation... I Think in older IOSR versions he administrator could limit this.

- Would you tell me how to hack that too? I´m not going to deal with unpaid reservations, The only reservations my customer wants are the ones that make the reservation paid: offline credit card, paypal and so on... Perhaps it is posible a selector to choose when to send the emails, fax, and so on: Imagine someone makes a reservation and email is sent, fax is sent, and sms is sent, but never give card data and the reservation autocancels.... to much confusion and money spent for nothing...


Thanks again
Title: Re: IOSR Hotels v2.3
Post by: datahell on April 27, 2016, 22:34:36
@juanon The feature was added. You can now (v2.3) enable the option the customer to delete bookings on cancellation.

@wieyoga It is a matter of database design, not IOSR code. The price fields are of type DECIMAL(9,2) Which means 9 digits including 2 decimals. So the maximum number it can accept is 9999999.99. This is why it doesn't store greater prices. Go to phpmyadmin and change all price fields from DECIMAL(9,2) to DECIMAL(10,2)

IOSR Hotels prices for rooms are in database table "elx_res_prices". Modify columns: price, price2pax, price3pax, price4pax, price5pax and price6pax

SQL commands:
ALTER TABLE `elx_res_prices` MODIFY COLUMN `price` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00';
ALTER TABLE `elx_res_prices` MODIFY COLUMN `price2pax` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00';
ALTER TABLE `elx_res_prices` MODIFY COLUMN `price3pax` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00';
etc...
Change "elx_" with your database prefix if it is different. These commands will not affect your existing data.
Title: Re: IOSR Hotels v2.3
Post by: wieyoga on April 28, 2016, 06:25:49
Great @datahell is work perfect now  :) :) :) :)
Title: Re: IOSR Hotels v2.3
Post by: juanon on April 29, 2016, 20:15:58
Hello Datahell,

I sent you a private message through the isopensource chat but I´m not sure if you get it.

I have been thinking about my second need and I think I would be easy for me to set a cron task to execute a php file that erase not paid reservations after a few time. Would you code it for me?

My third need is easy to achieve and I think is a good idea for everybody not let anyone to book all your staff in one single booking...

The last one is more difficult but perhaps we can find a way...

Don´t want to be a pain but this morning I had a new meeting with a local hotel association to start a hotel portal and they need this kind of automatic service.

Please, give me an answer. As said before I´m willing to pay.

Thanks again.

Regards


 

Title: Re: IOSR Hotels v2.3
Post by: datahell on April 29, 2016, 20:29:45
I got your mail but I didn't had time to answer, I would answer you later. I did your 2nd wish, autocancel can now be set from 15 minutes up to 30 days. If autocancel is set to less than a day cron jobs run multiple times per day. For example if you set autocancel to 30 minutes cron jobs will run each 30 minutes (48 times per day instead of 1). With 15 minutes cron jobs run 96 times per day, instead of just 1. This may slow down your site a little. I dont recommend setting this option less than a day but you can now do so if you like.

Today is good Friday, and we have Eastern in Sunday (orthodox, greece, cyprus, russia, serbia, bulgaria, etc). You might have to wait to get a reply to your mail.
Title: IOSR Hotels v2.3 released
Post by: datahell on May 02, 2016, 12:51:18
IOS Reservations updated to version 4.3
IOSR Hotels updated to version 2.3
IOSR Cars updated to version 1.1

Read this announcement for more (https://www.isopensource.com/news/ios-reservations-update-43.html)
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 02, 2016, 13:31:20
Hi Datahell,

I'm testing new version and... great new features!!

However I'm having some issues with autocancel in 15 minutes. It is not working properly or I dont fully understand how it works.

I have some not confirmed reservations and I go into the site every few minutes to trigger the cron but it takes hours to autocancel the unconfirmed reservations.

Could you please have a look?

Thank you and good work!

Title: Re: IOSR Hotels v2.3
Post by: datahell on May 02, 2016, 18:44:22
Where are you testing automatic cancel? As I have said several times, for both Elxis and IOS Reservations, scheduled tasks are triggered by site visitors. You need an online site with visitors for this feature to work properly. The more visitors your site has the most accurate scheduled tasks will be.
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 02, 2016, 18:47:11
Hi,

Yes I´m checking in an online site.

I also visit the site every few minutes to trigger the cron but unconfirmed reservations are not deleted in 15 minutes, it takes hours most times.

Thanks
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 02, 2016, 20:12:41
Don't make me repeat the same things, you don't test it properly.
After having passed 15 minutes from the reservation time go to a country page and refresh that page at least 4 times.
IOSR Hotels adds an entry in logs on each auto-cancel event.

IOSR time scheduled tasks work perfect on LIVE SITES WITH VISITORS, WEB ROBOTS, ETC.
DONT TEST THEM ON YOUR LOCAL OR UNDER CONSTRUCTION SITE.
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 02, 2016, 20:26:42
Ok,

But why country page and why at least 4 times?

Im working with just one country, so Im not using country pages, can this be the problem?

I just want to understand.

Thanks.
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 03, 2016, 09:36:48
It is a technical subject, iosr cron jobs have been designed wisely. It is not only the country page, they are several pages, country page is 1of them. Scheduled tasks check is a little heavy process, we don't want to run always and especially on heavy loaded pages with many database queries. They run on lighter pages and even on administration pages. Scheduled tasks are split in 4 parts, each time only 1part is executed. This is why you need to visit such a page at least 4 times, in order to make sure all tasks were executed.
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 03, 2016, 12:57:10
Hi Datahell,

It is clear now.

Thanks.
Title: Some "visual" features I´m in need of
Post by: jesusto on May 03, 2016, 15:05:52
Hi Datahell,

I need some visual improvements to achieve my custom design without touching your php code, mate, perhaps you can have them into account for the next version.

1 - Cities with accent mark are not highlighted in searh module if you look for it without the accent and it feels strage... I attach picture.
2 - It should be great that "Inside modules" in locations and hotel pages could be standalone ones so we can place them anywhere we want, above all the hotel filter and the search module inside the hotel (I remember there was a module for that in very old version), but also small map, latest reservation, hotels nearby and so on...

Thanks
Title: Re: IOSR Hotels v2.3
Post by: MangPutra on May 04, 2016, 11:25:15
Dear developer
first please apologize my bed english.

I hove IOSR can develop for Channel Manager to make it sync with most 3 hotel portal like;  agoda, bookingcom,expedia.
Without this features Hotel Owner wont update their price on our site, because they have alotof travel agent and hotel owner hard to update prices for all OTA.
that mean we can not compete with others travel agent.
Most of hotel portal system today offering with channel manager like siteminder and others, also for JoomlaHBS is already with channer manager.

if  their is possible to make it with IOSR i will invest for this feature.



Title: Re: IOSR Hotels v2.3
Post by: wieyoga on May 04, 2016, 13:01:41
Hi Mang,
I'm pretty sure you from Bali right :-)

regarding the connection interface, the developer already done with that.
IOSR system is support  XML connection  through (API )

Thank you
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 04, 2016, 20:14:15
As wieyoga said IOSR Hotels has already an XML/JSON API which you can use to build a connection with ANY third party service provider. Moreover IOSR Hotels has push notifications. Each third party service provider has its own integration system with IOSR Hotels API you can connect these 2 systems. It is not my job to build such a connection for the hundreds of other systems exist on the internet. I have given you the tools, you should build that or hire a developer to do that for you.

Note 1
Push notifications (v2.2+) are extremely easy to setup. Just provide the URL of a third party system that can accept bookings events (new reservation, cancel reservation, etc) and IOSR Hotels will automatically push the data to that URL.

Note 2
The full version of JoomlaHBS costs 1200 USD while IOSR + IOSR Hotels costs 175 EUR and JoomlaHBS has not even the 5% of the features of IOSR Hotels. I have seen several booking software on the internet, none of these has IOSR features and costs so less. Do the comparison by yourselves.

Note 3
IOSR Hotels demo site (http://iosr4.isopensource2.com/) updated to the latest versions:
Elxis 4.4, IOS Reservations 4.3, IOSR Hotels 2.3, IOSR Cars 1.1
Title: Re: IOSR Hotels v2.3 - Hotelier registration?
Post by: MG01 on May 10, 2016, 22:21:12
Hi datashell,

Can you please explain how new Hotelier registration form exactly works?
Can i have direct link to that form for all users, or only registered user can see that option?

Thanks and best regards,

MG
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 11, 2016, 20:28:33
Taken from IOSR Hotels users manual:
With this option guests can self register as hoteliers. After registration a notification email will be send to the site administrator to manually activate the hotelier account. The new hotelier will not be able to access hotelier's control panel till the administrator activate his account. Only for multiple hotels mode!

It works for both guests and logged-in users. By submitting the registration form if you don't own a user account IOSR Hotels will create one for you and log you in automatically. It will also create the hotelier's account but will keep it deactivated. Only a site administrator can activate that account.

The hotelier's registration page, if enabled, is been displayed in this url:
reservations/hotels/registration.html (for multiple IOSR extensions)
Elxis URI: reservations:hotels/registration.html
or
reservations/registration.html (if only IOSR Hotels extension is enabled)
Elxis URI: reservations:registration.html

See the form live: Hotelier registration at IOSR hotels demo site (http://iosr4.isopensource2.com/reservations/hotels/registration.html)
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 16, 2016, 00:42:59
Hi Datahell,

By default lastest IOSR versions shows terrain google maps and I would prefer standard ones (satelite), not possible to change?

Thank you
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 16, 2016, 08:53:54
The default map type in map library is "ROADMAP" although most maps are switched "HYBRID" which I believe is the best option.

To change all maps to "SATELLITE" open this file:
components/com_reservations/includes/map.class.php
Change line 23 from this:
'mtype' => 'ROADMAP', //ROADMAP, SATELLITE, HYBRID, TERRAIN
to this:
'mtype' => 'SATELLITE', //ROADMAP, SATELLITE, HYBRID, TERRAIN

Change lines 49-51 from this:
public function setOption($option, $value) {
   if (isset($this->options[$option])) { $this->options[$option] = $value; }
}
to this:
public function setOption($option, $value) {
   if ($option == 'mtype') { return; }
   if (isset($this->options[$option])) { $this->options[$option] = $value; }
}
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 16, 2016, 11:41:44
Hi,

Thank you for the superfast answer.

Title: Re: IOSR Hotels v2.3
Post by: judelgado on May 19, 2016, 20:27:32
Hello guys,

   I want to know if this is possible.  When a Tour Operator book a room or several on the site I want the booking comes directly to the site owner, not the hotelier.

    I create an additional column on the UserDB as email2, I try to achieve that when the Tour Operator logs in and make a reservation the booking info goes to email2 instead of hotelier email.  It doesn't matter that the reservation info appears on the hotelier control panel, just want the reservation request goes to email2 when logged as  Tour Operator.

   Any hint will be highly appreciated.

   Regards
Title: Re: IOSR Hotels v2.3
Post by: judelgado on May 23, 2016, 18:31:18
Anyone?
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 24, 2016, 12:23:50
E-mails are collected automatically by the hotel mailer class (ext/hotels/includes/hotmailer.class.php). So, you must modify that class.

To detect if the current user is tour operator:

$iosr = eRegistry::get('icore');
$helper = $iosr->loadOnce('hothelper', 'hotels');
$helper->isTourOperator(); //returns true if the current user is a tour operator, else false


To detect if a specific used with uid = 7 is tour operator:
$helper->isTourOperator(7); // true or false
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 24, 2016, 17:10:34
Hi, this is interesting,

Is there also a function like isHotelier?

Thank you
Title: Re: IOSR Hotels v2.3
Post by: datahell on May 24, 2016, 19:26:41
Yes, IOSR has excellent libraries for such things. In this case we will use the hotel owner library (iosrHotelowner) of IOSR Hotels.

Quick version without full checks
$is_hotelier = false;
$hotowner = eRegistry::get('icore')->loadx('hotelowner', 'hotels');
$hoid = $hotowner->getHotelierId($elxis->user()->uid);
if ($hoid > 0 { $is_hotelier = true; }


Proper version with full checks
$is_hotelier = false;
if ($elxis->user()->uid > 0) {
        $hotowner = eRegistry::get('icore')->loadx('hotelowner', 'hotels');
        $hoid = $hotowner->getHotelierId($elxis->user()->uid);
        if ($hoid > 0) {
                if ($hotowner->load($hoid)) {
                       if ($hotowner->check(false)) { $is_hotelier = true; }
               }
       }
}

Notes
1. The full check makes sure that both his user and hotelier account is not blocked and not expired.

2. With $hotowner instance after successfull load and check you can get all hotelier's details like this:
$info = $hotowner->getHotelier();

3. If you work outside IOS Reservations (like in a module) you must create a function to load/get IOSR core instance. This is done with the help of Elxis registry library (documentation here (https://www.elxis.net/docs/developers/libraries/eregistry.html)). IOSR core is required to access any IOSR extension or library. The function below will just do that:
function loadgetIOSR() {
   if (eRegistry::isLoaded('icore')) { return eRegistry::get('icore'); }
   if (!file_exists(ELXIS_PATH.'/components/com_reservations/includes/ios.core.php')) { return false; }
   elxisLoader::loadFile('components/com_reservations/includes/ios.core.php');
   eRegistry::set(new iosCore(), 'icore');
   return eRegistry::get('icore');
}

$iosr = loadgetIOSR();
Title: Re: IOSR Hotels v2.3
Post by: jesusto on May 24, 2016, 22:54:19
Great tutorial Datahell,

It is very appreciated.

Good work!!

Thank you
Title: Re: IOSR Hotels v2.3
Post by: MangPutra on May 28, 2016, 05:40:29
To Wieyoga:
Yes iam from bali, and iam not a developer, a web designer or a coding.
 i hove anyone can help me for this. Suksma.

To datahell
Yes you are right JoomlaHBS is very expensive.. that why i Choose your software.. not only cheap but very complete and powefull.

Could you help to develope the channer manager ? and what is the cost for that work.
I am very sure with this feature we not lost our hotel partner than our competitor
Title: Re: IOSR Hotels v2.3
Post by: juanon on May 28, 2016, 15:47:19
Hi,

I need to get some hotel data in my elxis default template to show, for example, the title.

I have this code that isn´t working:

function loadgetIOSR() {
   if (eRegistry::isLoaded('icore')) { return eRegistry::get('icore'); }
   if (!file_exists(ELXIS_PATH.'/components/com_reservations/includes/ios.core.php')) { return false; }
   elxisLoader::loadFile('components/com_reservations/includes/ios.core.php');
   eRegistry::set(new iosCore(), 'icore');
   return eRegistry::get('icore');
}

$hid = (defined('IOSR_HOTEL')) ? (int)IOSR_HOTEL : 0;
if ($hid > 0) {
    $iosr = loadgetIOSR();
    $helper = $iosr->loadOnce('hothelper', 'hotels');
    echo '<p><strong>THE HOTEL NAME IS: </strong> '.$hotel->title.''."</p>\n";
}



Can someone tell me  what I´m doing wrong, please?

Thanks a lot.
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 01, 2016, 19:47:27
Any help, please?

Thank you

Title: Re: IOSR Hotels v2.3
Post by: datahell on June 01, 2016, 21:50:10
There is no $hotel object defined in your code, so $hotel->title is wrong and will return error. You must first query the database to load hotel data, then use that data.

Simple example without multilingual content:

$hid = 23;//change with the id of the hotel you want to display

$db = eFactory::getDB();
$sql = "SELECT h.hid, h.title, h.seotitle AS seohotel, h.description, h.lid, h.stars, h.defimage, h.rscore, h.reviews, l.country, l.title AS location, l.seotitle, l.seolink"
."\n FROM ".$db->quoteId('#__res_hotels')." h"
."\n INNER JOIN ".$db->quoteId('#__res_locations')." l ON l.lid = h.lid"
."\n WHERE h.published = 1 AND h.hid = ".$hid;
$stmt = $db->prepareLimit($sql, 0, 1);
$stmt->execute();
$hotel = $stmt->fetch(PDO::FETCH_OBJ);
if (!$hotel) {
     echo 'Hotel '.$hid.' not found!';
} else {
    echo 'Hotel title: '.$hotel->title.'<br />';
    echo 'Hotel location: '.$hotel->location.'<br />';
}
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 01, 2016, 23:00:21
Thank you,

It works now!!

Could you please leave a multilingual example?

Thanks a lot
Title: Re: IOSR Hotels v2.3
Post by: webgift on June 03, 2016, 11:40:48

You could use your template's language files by creating new elements on $_lang array. For
example the english version could be done:

File in language directory: en.tpl_mytpl.php
$_lang['HNOT_FOUND'] = 'Hotel %s not found!';
$_lang['HOT_TITLE'] = 'Hotel title:';
$_lang['HOT_LOCATION'] = 'Hotel location:';


Now edit the source code datahell's send you by changing the lines:
1. echo 'Hotel '.$hid.' not found!'; to
echo sprintf($eLang->get('HNOT_FOUND'), %hid);

2. echo 'Hotel title: '.$hotel->title.'<br />'; to
echo $eLang->get('HOT_TITLE').' '.$hotel->title.'<br />';

and 3. echo 'Hotel location: '.$hotel->location.'<br />'; to
echo $eLang->get('HOT_LOCATION').' '.$hotel->location.'<br />';
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 03, 2016, 15:34:26
Hi,

Thanks a lot webgift.

But what I want is to get multilingual data from hotels.

For example hotel description in several languages.

Thanks a lot
Title: Re: IOSR Hotels v2.3
Post by: datahell on June 03, 2016, 22:00:05
Translations require complex code and queries.

METHOD 1
I write an example below as a continue of my previous code.

There are many multilingual items on a hotel, I don't know what you want to display. This will set multilingual hotel title only. For location, description, etc, the query needs to be modified.

$elxis = eFactory::getElxis();
if ($elxis->getConfig('MULTILINGUISM') == 1) {
   $lng = eFactory::getURI()->getUriLang();
   if ($lng != '') {
      $hid = $hotel->hid;
      $trcat = 'com_reservations';
      $elem = 'hottitle';
      $sql = "SELECT ".$db->quoteId('translation')." FROM ".$db->quoteId('#__translations')
      ."\n WHERE ".$db->quoteId('category')." = :xcat AND ".$db->quoteId('element')." = :xelem"
      ."\n AND ".$db->quoteId('language')." = :lng AND ".$db->quoteId('elid')." = :xid";
      $stmt = $this->db->prepareLimit($sql, 0, 1);
      $stmt->bindParam(':xcat', $trcat, PDO::PARAM_STR);
      $stmt->bindParam(':xelem', $elem, PDO::PARAM_STR);
      $stmt->bindParam(':lng', $lng, PDO::PARAM_STR);
      $stmt->bindParam(':xid', $hid, PDO::PARAM_INT);
      $stmt->execute();
      $trans = $stmt->fetchResult();
      if ($trans) {
         $hotel->title = $trans;
      }
   }
}

For everything in IOS Reservations the translation category is "com_reservations"
The element name for hotel title is hottitle, for hotel description is hotdesc, for location title is loctitle, for room title is roomtitle, for room description is roomdesc, etc...
Depending on which is the translation element the translation element id (elid) must be set to hotel id (hid), location id (lid), room id (rid), etc.

METHOD 2
The code below is superior than the previous example which used sql query to get hotel title. It uses IOSR db model to load all hotel translations without need to write sql queries:

$elxis = eFactory::getElxis();
if ($elxis->getConfig('MULTILINGUISM') == 1) {
    $lng = eFactory::getURI()->getUriLang();
    if ($lng != '') {
   elxisLoader::loadFile('components/com_reservations/models/base.model.php');
   elxisLoader::loadFile('components/com_reservations/ext/hotels/models/hotels.model.php');
   $model = new hotelsIOSRM();

   $translations = $model->elementTrans($hotel->hid, $lng);
   if ($translations) {
      foreach ($translations as $element => $translation) {
         switch($element) {
            case 'hottitle': $hotel->title = $translation; break;
            case 'hotdesc': $hotel->description = $translation; break;
            case 'hotterms': $hotel->terms = $translation; break;
            default: break;
         }
      }
   }
    }
}

If you pick method 2 you can also use IOSR Hotels model to get the full hotel data without executing sql queries:
$hotel = $model->fetchHotel($hid); //that's all!

To load hotel you can also use standard Elxis database table library:
elxisLoader::loadFile('components/com_reservations/ext/hotels/includes/db/hotels.db.php');
$hotel = new hotelsDbTable();
$hotel->load($hid);

This way you can load anything from db but for third party component  requires first to include the x.db.php file. For Elxis tables you dont need that because Elxis does it automatically for you! For example to load an article with id 5 just use this:
$article = new contentDbTable();
$article->load(5);
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 04, 2016, 18:52:11
Great explanation, Datahell.

Thanks a lot for taking the time to write such a good tutorial.

Regards
Title: Re: IOSR Hotels v2.3
Post by: webgift on June 05, 2016, 13:47:07
As far as i can see, using the 2nd method you can get translations for location and rooms
instead of hotels for example: loctitle, roomtitle, roomdesc!
Title: Channel managers will kill my business
Post by: juanon on June 16, 2016, 12:33:15
Hi,

I´m a bit down with IOSR hotels right now. Due to "new rules in hotel marketing" it is not possible to earn a living or even get an extra income...

The system is really solid and the price is very very good, but I can´t bring new users to my portal and old ones are leaving...

They all want to use a channel manager and even a PMS integrated with the booking engine... They all are willing to pay more but don´t want to mantein availability in eight or ten different accounts... and I can understad that.

I would like to pay a develeper to integrate IOSR at least with booking.com and agoda but I can´t even find a developer booking.com API to achieve this.

What can I do? I know IOSR API is really good but it doesn´t seem to be enough with that.

Any ideas?

What´s your opinion?

Thanks

Title: Re: Channel managers will kill my business
Post by: wieyoga on June 17, 2016, 08:39:15
Hi Juanon,

From my point of view, The IOSR system is already support the connection ( XML API ).
what you need to do is contact the channel manager company to connect to IOSR
Title: Re: Channel managers will kill my business
Post by: juanon on June 17, 2016, 10:39:22
Hi,

Thanks but...  I wish it could be that easy.

I have spoken about IOSR to several channel manager companies, they only work with its own booking engine... Do you know one that can make the job?

Any help will be very welcome.

Thanks a lot
Title: Re: Channel managers will kill my business
Post by: wieyoga on June 17, 2016, 11:15:54
Hi @Juanon,

Please contact
Rategain or STAAH Channel Manager.

Normally they will asking fee for the integration & the cost is not cheap  ;D




Title: Re: IOSR Hotels v2.3
Post by: datahell on June 18, 2016, 20:11:27
Once I was very close to develop a connection with myallocator (https://www.myallocator.com/). They have a very good API (https://inbox.myallocator.com/n/api_examples.xt). I have to say that it is not my business to develop such connections with third parties (*) as it is a very custom job. I have developed an API and you can use this API as a tool to connect to ANY third party services. Also note that the easier integration method IOSR Hotels provides you are the PUSH URLs.

* Note: Especially booking.com is a very "closed" service. I believe they don't really want connections with other systems, they want to get all the customers to their site.
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 19, 2016, 01:19:23
Hi Datahell,

I tried Wieyoga advices with no luck.

I dont know how companies can deal with booking.com... But there are hundreds of them that offer its own channel managers... How the hell they get an API?

Myallocator can be a aceptable solution but... What problems did you find trying to develop a connection with them?

Could you please reconsider coding it for all iosr users, please? Im sure many of us are willing to pay again for a new version that can save our business, you are the only one we can trust to do the job, you are the man that completely knows IOSR system.

Please think about it...

Thanks a lot






Title: Re: IOSR Hotels v2.3
Post by: MangPutra on June 19, 2016, 10:03:31
Iam 100% agree with juanon
i also ask to make custom development for this features api with channel manager but its seem no chance to do that.
After 1 year using this booking system all the hotel owner do not want to  UPDATE their availbility anymore.
Title: Re: IOSR Hotels v2.3
Post by: datahell on June 19, 2016, 20:38:57
I develop a full featured standalone booking system, this is what you bought. I am not responsible for services provided by third parties. If you need customizations, special styling, connections with third parties, custom payment options, or anything not included in IOSR, you pay a developer and does these for you. Some things costs a lot of money and take time to be developed. You cannot make business without investing money. IOSR costs really low but this does not mean that you can have a site like booking.com with 175 EUR! If you want to do serious business raise your budget and hire some professionals. IOSR is written in PHP. A serious developer can work just fine with it even if he see it for the first time! If someone tells you the opposite then either he is an amateur or you pay him too less. If for example you tell me to do something for you that will take me 1 week to complete and you pay for this job 50 EUR I will tell you no, not because I can't do it, but because I dont want to spend so much time for something that will give me 50 EUR. 50x4 = 200EUR, no a good monthly salary, dont you agree?
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 20, 2016, 01:47:20
Ok, your posiition is totally clear and I respect it, of course.

Just there is one thing I dont like in your words:

- I know how much a business takes in time and money and I agee with that.
- I know how much a developer should earn and I agree with that too.

I chose IOSR because of its stability and suport not because of its price, if your business can give you the oportunity to earn a living it doesnt really matters that the system you use costs 200 or 2000. Of course I know such a great improvement (channel manager) wont be free or even cheap.

I love Elxis and IOSR but sadly the hotel marketing is changing very fast and what it worked yesterday is not working today, believe me, I deal with hoteliers everyday. I just wonder how some (really bad) component in joomla and wordpress can have a channel manager, again Im not talking about money although some of them are really cheap but just with a few of the features IOSR has.

Before asking you anything I had tried to contact some developer to create a channel manager for me... I had no luck.

Im so sorry if my words have bothered you, AGAIN: I LOVE YOUR WORK, and Im sure you will work in your own channel manager someday because business demands it. Im sad for having to look for an IOSR alternative (that Im sure wont work so good) and teach my customers a new system.

If there is a developer reading this that can do de job,  please contact me. I never consider me as a stingy person, it is not the issue here.

Regards.


Title: Re: IOSR Hotels v2.3
Post by: datahell on June 20, 2016, 08:14:01
Three things. 1. A channel manager integration can have many levels, someone may say that by writing 10 lines of code he has a channel manager integration but he hasn't. 2. Which joomla component are you talking about? 3. Currently I work on Elxis 4.5 and after I will go on vacations. We can discuss an IOSR update in 1-2 months.
Title: Re: IOSR Hotels v2.3
Post by: webgift on June 20, 2016, 08:19:54
If you allow me...
I don't think that you've been called as stingy. @datahell just wrote you that IOSR Hotels
is a booking engine nothing more or less. Each time he performs an update process he receives
a number of requests that addressed to the booking engine only. 

However you've requested for CM.
Channel manager is something different as connect several booking engines so you have an
implementation with third parties. This has nothing to do with an idea of standalone software.

Beside of that there is one other thought:
If channel manager feature will theoretically be included to the IOSR software. Do you ask
if other customers of IOSR wants to pay the difference for this feature? When you offer
something to public then you need to consider the benefit of many.

So i think that CM is consist of an extra feature for a standalone booking engine so it must
be charged as an extra. I think that there are a huge number of skilled PHP developers that
you could hire.

P.S:
@datahell i read vacations... is this a new extension or [1]? Ahahaha!

[1]: http://tinyurl.com/hp5dsdu (http://tinyurl.com/hp5dsdu) [image file]
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 20, 2016, 09:47:41
Dear friends,

First of all I don´t want anybody to get angry with this.

Datahell is a great developer always willing to help and also you, Webgift, that give us your time helping here in the Elxis forums almost everyday. I very much appreciate that.

Of course I know what I´m asking for, It is something different to a new feature, perhaps not everybody needs it right now (althoug the business is moving that way) and I know It would have a new price... that´s right!!

Almost any booking engine has some kind of channel manager nowadays because that is what hoteliers want. Some of them offer its own connection,  other just an integration with a channel manager company. I leave here some examples:

FOR JOOMLA & WORDPRESS
------------------------------------
- Goreserva (although it seems to be hacked, had cloud PMS and channel manager)
- Jomres (that I hate) has a connection with beds24.com, something similar to myallocator I guess.
- Vik booking has Vik Channel manager.

STANDALONE ONES
------------------------
- http://www.neobookings.com
- http://www.reservadealojamientos.com/es/ar/138/motor-de-reservas-con-channel-manager.html
- https://avirato.com/channel-manager/

Regards






Title: Re: IOSR Hotels v2.3
Post by: fbookin on June 20, 2016, 14:26:16
Hello everybody.I want to say that I agree with datahell. Good php programmer can make creat integration to channel manager. I have a company in Russia and creat integration to channel manager travelline.I can say what should be done to create a separate synchronization and add to iosr reservation to notification.
Title: Re: IOSR Hotels v2.3
Post by: datahell on June 20, 2016, 17:33:50
@juanon: No one gets angry, we make a civilized discussion. From the links you posted I can't talk about the standalone solutions because their pages are in Spanish. Goreserva, as you said, most probably hacked. Jomres uses a third party service (beds24.com) which is like myallocator, although I believe myallocator has a much better API and documentation. I dont know what "Vik Channel manager" is, I can discuss only for solutions based on public and well documented APIs. So only Jomres has something like the one you want. My personal opinion is that it doesn't look good.

Also my opinion on the whole subject is that the hoteliers don't want channel managers because they are expensive but they are forced to use them. Do you know how much fee booking.com takes on a reservation? Do you think there is even 1 hotelier that likes paying such fees?

Now, does anyone knows how much these third parties charge to connect your ROOM with a site like booking.com? Be careful, they charge per room. How exactly you will make a deal with them for an IOSR installation with hotels owned by multiple people? Have you ever talked to any of these third parties about how such an integration can be achieved? Have they ever told you a price? I would like to see a price offer for an IOSR site with just 10 hotels having 100 rooms in total.
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 20, 2016, 19:19:18
Hi Datahell,

Sadly I can´t answer these questions.

It is true they are forced to work with booking.com and also to pay a channel manager.

But trying to compete with booking.com (or other big ones) with SEO is nowadays totally impossible.

So hoteliers assume the price, I can tell you I have been speaking with several hoteliers last week to bring them to my system and they refuse because they "don´t want to set some rooms here and others there"... they simply preffer to pay more and forget about headaches and overbooking... that is the situation.

Channel Managers are not cheap so if you create your own it can be a very profitable business.

I continue searching for a developer before I give up and using other system, but it seems everyting related to OTA connections is a big secret... I can´t understand that.

Regards

Title: Re: IOSR Hotels v2.3
Post by: datahell on June 20, 2016, 20:51:16
........it seems everything related to OTA connections is a big secret... I can´t understand that.

This is the most important thing you said. You just begun understanding whats happening...
Title: Re: IOSR Hotels v2.3
Post by: fbookin on June 21, 2016, 16:15:22
I have documentation for integration ios reservation and channel manager.I can help with the iteration
Title: Re: IOSR Hotels v2.3
Post by: juanon on June 21, 2016, 21:39:27
Hi fbookin,

Are you a developer?

Can you please share that documentation, please?

Thanks a lot
Title: Re: IOSR Hotels v2.3
Post by: fbookin on June 22, 2016, 14:11:39
juanon. My documentation in Russia language. You can contact me on Skype. I will try to help. My skype vic.gher