Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Allow bookings with no adults and only children in an accommodation
- This topic has 10 replies, 7 voices, and was last updated 1 year, 7 months ago by J. Davis.
- AuthorPosts
- December 15, 2020 at 11:26 am #1047156Thomas HallwrightParticipant
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
December 17, 2020 at 8:36 am #1048055Andre FloresModeratorHello 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,
AndreDecember 21, 2020 at 10:15 am #1049737Thomas HallwrightParticipantHi
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.
December 22, 2020 at 7:27 am #1050317Andre FloresModeratorHello 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,
AndreJanuary 3, 2021 at 1:48 pm #1054204Thomas HallwrightParticipantHi
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 0AND
Line 186 of motopress-hotel-booking/includes/views/shortcodes/checkout-view.phpChange 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
January 4, 2021 at 8:24 am #1054390Andre FloresModeratorHello 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,
AndreDecember 3, 2021 at 2:40 am #1226331Chen Chiang CHAIParticipantI want this to be implemented as well. Thanks
September 18, 2022 at 12:58 am #1355565Andrew MussellParticipantThanks 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
March 26, 2023 at 8:56 pm #1433977Nicole PatonParticipant+1 for this feature request please.
March 30, 2023 at 3:51 am #1435813Gitte SørensenParticipant+1 from here as well.
April 2, 2023 at 2:51 am #1436916J. DavisKeymasterHi, Thanks, your feedback has been added.
- AuthorPosts
- You must be logged in to reply to this topic.