Room's calendar reservation

GK User
Tue Sep 08, 2015 10:51 am
Hi Gavick,
I have a question: is it possible to put in a room's calendar the days already reserved in a simple way?
Thanks
Indo
User avatar
Junior Boarder

GK User
Tue Sep 08, 2015 3:51 pm
Hi,
in QS we used Solidres component and modules from it, so please check on their project site, documentation or on forum. We cannot support all topics/questions/request about it.
User avatar
Platinum Boarder

GK User
Fri Sep 11, 2015 2:55 pm
Hi,
what is "QS"?
Anyway I checked your plugin (gk-hotel-reservation) source code and the Solidres Package for Wordpress (which is a beta) and they are different. I know you use Solidres components and modules with Joomla but do you do the same with Wordpress?
Thanks
User avatar
Junior Boarder

GK User
Fri Sep 11, 2015 4:29 pm
QS - Quickstart
Sorry I forgot this is Wordpress topic but I saw on their site:
Solidres for Joomla: 0.9.1 Stable. Compatible with Joomla 3.4+
Solidres for WordPress: 0.1.0. Compatible with Wordpress 4.0+)

so it's not so bad.
User avatar
Platinum Boarder

GK User
Mon Sep 14, 2015 8:13 am
Hi,

We are not using Solidres for WordPress version of the Hotel. GK Hotel Reservation is a custom GavickPro wordpress plugin.
User avatar
Moderator

GK User
Mon Sep 14, 2015 1:52 pm
Hi,
Thanks for the replies.
My goal is to have a website like your Hotel Demo in Joomla. In example: The calendar's room must have the availability (just like Hotel Demo in Joomla with Solidres does)
The Home calendar must generates a list of available rooms (just like Hotel Demo in Joomla with Solidres does)
Your custom plugin seems to send only an email and it's not enough.
I'd like to integrate the Solidres Wordpress Plugin in your Hotel Wordpress Theme. (Just the same you did in joomla).Than, if you want, I can share it with you and I can debug Solidres plugin (I already found problems, It's a beta), so we'll be all happy. What do you think? Can you give me a little help to start? Do you think the download of the joomla theme is helpful (maybe to get the style files of the Solidres pages)?
Thanks
Indo
User avatar
Junior Boarder

GK User
Mon Sep 14, 2015 1:58 pm
Hi,

We've checked the Solidres plugin for WordPress first and there were a lot of issues with it. (it's a beta version), so we've decided to create own (very simple) plugin for reservation. Maybe you should wait for the next version of Solidress, because it will be really difficult to fix these issues.
User avatar
Moderator

GK User
Tue Sep 15, 2015 11:28 am
Hi Piotr,
thank you. I'd like to speed up this release process, so I plann to test and report the bugs of this beta. Do you have eventually a bug list of that.
Sorry but your plugin is useless since It doesn't save the reservations and create a rooms list based on availability.
What do you think?
I need to use the Wordpress theme but I need the features that Joomla once has. Please help.
Thanks
User avatar
Junior Boarder

GK User
Tue Sep 15, 2015 12:05 pm
Maybe check other reservations plugins for WP, I guess there are others, maybe not all are BETA.
User avatar
Platinum Boarder

GK User
Fri Sep 18, 2015 9:44 am
Piotr Kunicki wrote:Hi,

We've checked the Solidres plugin for WordPress first and there were a lot of issues with it. (it's a beta version), so we've decided to create own (very simple) plugin for reservation. Maybe you should wait for the next version of Solidress, because it will be really difficult to fix these issues.


Hi Piotr ,
looking for a good reservetion plugin, I noticed that Solidres posts their own plugin here:
https://wordpress.org/plugins/solidres/
and this is deifferent from the 0.1.0Beta which you can download from their website.
Which version did you check?
User avatar
Junior Boarder

GK User
Fri Sep 18, 2015 1:54 pm
Both packages are version 0.1.0, in the version from wordpress repository, there are names changed and other small modifications, you can compare files. Unfortunately we don't think that this version is a good solution and the last update of the plugin was 2015-3-20, so we've decided to create our own simple plugin.

Of course you can try this solidres or any other reservation plugin from the repository.
User avatar
Moderator

GK User
Mon Sep 21, 2015 4:17 am
We decided to use https://www.hotelrsv.com with the following modifications to PHP source of Gavick's widget:
Instead of class="gk-hotel-reservation-make-btn" we changed to:
class="rsv-app-launcher rsv-mobile-launcher" since this launches the reservation app.

Then, there's a listener in JS that updates the data-hotelrsv-dt-arrival and data-hotelrsv-dt-departure values in AAAAMMDD format on the reservation button when calendars change.

https://hotelrsv.atlassian.net/wiki/display/HRSVDOCEN/Reservation+Buttons+-+Action+Elements
Hope it helps!
User avatar
Senior Boarder

GK User
Mon Sep 28, 2015 12:08 am
For whoever is using https://www.hotelrsv.com reservation engine compatible with wordpress, here's what we did:

We modified the gk.hotel.reservation.js as follows:
BEFORE:
Code: Select all
onSelect: function() {
         $(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", $(this).datepicker("getDate")));
         $(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", $(this).datepicker("getDate")));
         $(".gk-hotel-reservation-form .checkout_datepicker_inline_module").slideToggle();
         $(".gk-hotel-reservation-form .checkin_module").removeClass("disabledCalendar");
      }


AFTER:
Code: Select all
onSelect: function() {
         $(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", $(this).datepicker("getDate")));
         $(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", $(this).datepicker("getDate")));
         $(".gk-hotel-reservation-form .checkout_datepicker_inline_module").slideToggle();
         $(".gk-hotel-reservation-form .checkin_module").removeClass("disabledCalendar");
// custom hotelRSV code //
         var selectedCheckoutDate = $.datepicker.formatDate("yymmdd", $(this).datepicker("getDate"));
         $('#rsvWidgetButton').attr('data-hotelrsv-dt-departure', selectedCheckoutDate);
         // end custom hotelRSV code //
      }


We also modified the checkout onSelect:

BEFORE:
Code: Select all
onSelect : function() {
         var currentSelectedDate = $(this).datepicker("getDate");
         var checkoutMinDate = $(this).datepicker("getDate", "+1d");
         checkoutMinDate.setDate(checkoutMinDate.getDate() + minLengthOfStay);
         checkout.datepicker( "option", "minDate", checkoutMinDate );
         checkout.datepicker( "setDate", checkoutMinDate);

         $(".gk-hotel-reservation-form input[name='gk-checkin']").val($.datepicker.formatDate("yy-mm-dd", currentSelectedDate));
         $(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", checkoutMinDate));

         $(".gk-hotel-reservation-form .checkin_module").text($.datepicker.formatDate("dd/mm/yy", currentSelectedDate));
         $(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", checkoutMinDate));
         $(".gk-hotel-reservation-form .checkin_datepicker_inline_module").slideToggle();
         $(".gk-hotel-reservation-form .checkout_module").removeClass("disabledCalendar");
      },


AFTER:

Code: Select all
onSelect : function() {
         var currentSelectedDate = $(this).datepicker("getDate");
         var checkoutMinDate = $(this).datepicker("getDate", "+1d");
         checkoutMinDate.setDate(checkoutMinDate.getDate() + minLengthOfStay);
         checkout.datepicker( "option", "minDate", checkoutMinDate );
         checkout.datepicker( "setDate", checkoutMinDate);

         $(".gk-hotel-reservation-form input[name='gk-checkin']").val($.datepicker.formatDate("yy-mm-dd", currentSelectedDate));
         $(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", checkoutMinDate));

         $(".gk-hotel-reservation-form .checkin_module").text($.datepicker.formatDate("dd/mm/yy", currentSelectedDate));
         $(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", checkoutMinDate));
         $(".gk-hotel-reservation-form .checkin_datepicker_inline_module").slideToggle();
         $(".gk-hotel-reservation-form .checkout_module").removeClass("disabledCalendar");

         // custom hotelRSV code //
         var selectedCheckInDate = $.datepicker.formatDate("yymmdd", currentSelectedDate);
         $('#rsvWidgetButton').attr('data-hotelrsv-dt-arrival', selectedCheckInDate);
         var checkoutDate = checkout.datepicker("getDate");
         checkoutDate = $.datepicker.formatDate("yymmdd", checkoutDate);
         $('#rsvWidgetButton').attr('data-hotelrsv-dt-departure', checkoutDate);
         // end custom hotelRSV code //

      },


And we added the following code right before
Code: Select all
$(".gk-hotel-reservation-form .checkout_module").click(function() {


Code: Select all
   // custom hotelRSV code //
   var initialCheckInDate = $.datepicker.formatDate("yymmdd", checkin.datepicker("getDate"));
   $('#rsvWidgetButton').attr('data-hotelrsv-dt-arrival', initialCheckInDate);
   var initialCheckoutDate = $.datepicker.formatDate("yymmdd", checkout.datepicker("getDate"));
   $('#rsvWidgetButton').attr('data-hotelrsv-dt-departure', initialCheckoutDate);
   // end custom hotelRSV code //
       $(".gk-hotel-reservation-form .checkout_module").click(function() { ...


On the gk-hotel-reservation.php File, we changed this lines:

BEFORE:
Code: Select all
$output .= '<input type="button" value="'.__('Make reservation', 'gk-hotel-reservation').'" class="gk-hotel-reservation-make-btn" />';


AFTER:
Code: Select all
$output .= '<input id="rsvWidgetButton" type="button" value="'.__('Make reservation', 'gk-hotel-reservation').'" class="rsv-app-launcher rsv-mobile-launcher" />';


As the classes rsv-app-launcher rsv-mobile-launcher are required to make the engine work.
User avatar
Senior Boarder

GK User
Mon Sep 28, 2015 7:18 am
Thank you for sharing the solution, i'm sure it will be useful fo other users.
User avatar
Moderator


cron