Elxis CMS Forum

Extensions => Components => Topic started by: marbaz on August 27, 2012, 13:19:00

Title: IOSReservations : Contact Form Hotels
Post by: marbaz on August 27, 2012, 13:19:00
Is it possible to edit the "hotel contact form" so that it will sent the mails to for example support@mysite.com ?

I don't want people can send an email directly to the hotel but when they have questions about the hotel they fill in the contact-form and than the mail is sent to our support team..

Title: Re: IOSReservations : Contact Form Hotels
Post by: webgift on August 27, 2012, 13:38:52
Yes you can do that.
Important: It's not my fault in case that any issue will be generated there. Ok?

File: components/com_reservations/fcontrollers/hotels.controller.php
line: ~787
You will find and array called $info like :
      $info = array (
         'ownerid' => $hotel->ownerid,
         'ownername' => $hotel->ownername,
         'owneremail' => $hotel->owneremail,
         'hotel' => $hotel->title,
         'location' => $hotel->loctitle,
         'ip' => $_SERVER['REMOTE_ADDR'],
         'guestname' => $guestname,
         'guesttaxy' => $guesttaxy,
         'guestphone' => $guestphone,
         'guestmobile' => $guestmobile,
         'guestmsg' => $guestmsg,
         'link' => $backlink
      );


You should change the array's value of its key 'owneremail'. Like:

      $info = array (
         'ownerid' => $hotel->ownerid,
         'ownername' => $hotel->ownername,
         'owneremail' => 'support@mysite.com',
         'hotel' => $hotel->title,
         'location' => $hotel->loctitle,
         'ip' => $_SERVER['REMOTE_ADDR'],
         'guestname' => $guestname,
         'guesttaxy' => $guesttaxy,
         'guestphone' => $guestphone,
         'guestmobile' => $guestmobile,
         'guestmsg' => $guestmsg,
         'link' => $backlink
      );
Title: Re: IOSReservations : Contact Form Hotels
Post by: marbaz on August 28, 2012, 19:24:55
Hi Webgift, i will try that,

thanks! :-)
Title: Re: IOSReservations : Contact Form Hotels
Post by: marbaz on August 28, 2012, 20:40:41
Worked like a charm :-)
Thanks!
Title: Re: IOSReservations : Contact Form Hotels
Post by: webgift on August 29, 2012, 10:29:58
You are welcome, marbaz! ;)