Allow bookings with no adults and only children in an accommodation

Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Allow bookings with no adults and only children in an accommodation

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1047156
    Thomas Hallwright
    Participant

    Hi
    I have some bunk rooms in a lodge that I am using as accommodations, under an accommodation type that is the bunk room name.

    The problem with this is the plugin does not allow only children to be assigned to an accommodation (the bed in a bunk room), and therefore a bunk bed, which has an occupancy of 1 cannot have children in it at all.

    How do I remove the minimum 1 adult restriction per accommodation?

    Thanks

    #1048055
    Andre Flores
    Moderator

    Hello Thomas,

    The plugin indeed does not allow booking accommodations without any adult in it. We do have a feature request to allow bookings without adults, however, it has not been quite popular to the date. I have added your up-vote to the request as well and in case there are more similar requests from other users, we might consider implementing this feature in one of the plugin future updates.
    Meanwhile, you may hide adults and children fields and use Guests field instead. If it is necessary for you to know whether it is an adult or a child, you may ask your guests to add this information to the Notes field on the Checkout page. Alternatively, you may use our nice Checkout Fields add-on in order to add a select field for your guests to point out the number of adults/children in the booking.

    Regards,
    Andre

    #1049737
    Thomas Hallwright
    Participant

    Hi
    Thanks for your response, however I do not understand why Motopress is so unwilling to provide simple changes to code that makes a huge difference to your clients
    I have almost no PHP experience, and managed to find out after several hours that all that is required to make this work, is to change a 1 to a 0, in three different places in the plugin.

    Someone who is familiar with the plugin and has more than a week of experience with PHP should therefore be able to help with this in less than 5 minutes?

    I would appreciate if you could consider this in future instances.

    #1050317
    Andre Flores
    Moderator

    Hello Thomas,

    The issue is our developers have a list of tasks, each one with its own priority, that they must follow. Unfortunately, this feature request has not been quite popular to the date, therefore it has not been considered to be implemented yet. Besides changing code they would also need to check performed changes with different variations in order to make sure everything works in tact – this takes pretty much developer hours, that is why certain amount of time is used for each feature to be developed.

    If you have some hints on how to achieve the result you were looking for, you may share it with other users, I am sure they will be grateful to you.

    Regards,
    Andre

    #1054204
    Thomas Hallwright
    Participant

    Hi
    As mentioned there are three changes required to make this work;

    Line 99 in motopress-hotel-booking/includes/settings/main-settings.php
    Change getminadults to return 0

    AND
    Line 186 of motopress-hotel-booking/includes/views/shortcodes/checkout-view.php 

    Change the for loop to start at 0 rather than 1
    <?php for ($i = 0; $i <= $maxAdults; $i++) { ?>

    AND
    TO REMOVE THE ERROR ON THE BOOKING PAGE,
    Edit line 452 of motopress-hotel-booking/includes/ajax.php
    Change the 1 to a 0
    $adults = Utils\ValidateUtils::validateInt( $input, 0 );

    This works for me however allows people to now book with zero people in the room, I have not yet added a warning to prevent this, as it will still charge the full price of the room

    #1054390
    Andre Flores
    Moderator

    Hello Thomas,

    Thank you for sharing your insights, it is much appreciated. I hope it will be helpful as a temporary workaround to other users.
    Do not hesitate to share updates on the code in case there are any.

    Regards,
    Andre

    #1226331
    Chen Chiang CHAI
    Participant

    I want this to be implemented as well. Thanks

    #1355565
    Andrew Mussell
    Participant

    Thanks to Thomas for sharing his workaround to this problem. I will try it out myself but I agree that the plugin should provide this feature as standard. Please implement it

    #1433977
    Nicole Paton
    Participant

    +1 for this feature request please.

    #1435813
    Gitte Sørensen
    Participant

    +1 from here as well.

    #1436916
    J. Davis
    Keymaster

    Hi, Thanks, your feedback has been added.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.