Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Wrong behaviour of search results
- This topic has 44 replies, 18 voices, and was last updated 2 months, 2 weeks ago by J. Davis.
- AuthorPosts
- May 16, 2023 at 5:35 am #1455025Adrianna SchmittParticipant
please add my upvote to this feature.
July 4, 2023 at 5:26 am #1475281Rolando RodriguesParticipantIt is not normal that the result of the search does not take into account the total capacity… it must be changed as soon as possible.
Add my upvote to this feature.July 6, 2023 at 6:59 am #1476169J. DavisKeymasterThanks for your feedback. Your upvote has been added.
July 20, 2023 at 9:02 pm #1481545Jo MinneyParticipantPlease add my upvote to this feature. It’s wild that we’ve been waiting for three years for this – especially when someone as literally already given you the code to make it work. You just need to make it part of your plugin so we don’t need to hack the plugin code every time we do an update. Do better.
July 31, 2023 at 4:47 am #1485348J. DavisKeymasterHi, your upvote has been added.
April 24, 2024 at 12:26 am #1606510Martin FourdrignierParticipantHi,
I was using the tweak proposed by Jeffrey Donchez in April 2021. It was working perfectly (I had to re-upload the modified file search-results-shortcode.php at each update, which is only a minor inconvenience) until the update from version 4.8.8. Now, I get the following fatal error:Fatal error: Uncaught Error: Call to undefined method HotelBookingPlugin::getRulesChecker() in /home/customer/www/coquelicot.com/public_html/wp-content/plugins/motopress-hotel-booking/includes/shortcodes/search-results-shortcode.php:598 Stack trace: #0 /home/customer/www/coquelicot.com/public_html/wp-content/plugins/motopress-hotel-booking/includes/shortcodes/search-results-shortcode.php(502): MPHB\Shortcodes\SearchResultsShortcode->parseCheckOutDate('2024-06-29') #1 /home/customer/www/coquelicot.com/public_html/wp-content/plugins/motopress-hotel-booking/includes/shortcodes/search-results-shortcode.php(472): MPHB\Shortcodes\SearchResultsShortcode->parseInputData(Array) #2 /home/customer/www/coquelicot.com/public_html/wp-content/plugins/motopress-hotel-booking/includes/shortcodes/search-results-shortcode.php(516): MPHB\Shortcodes\SearchResultsShortcode->setupSearchData() #3 /home/customer/www/coquelicot.com/public_html/wp-includes/class-wp-hook.php(324): MPHB\Shortcodes\SearchResultsShortcode->setup(Object(WP)) #4 /home/cu in /home/customer/www/coquelicot.com/public_html/wp-content/plugins/motopress-hotel-booking/includes/shortcodes/search-results-shortcode.php on line 598
Any idea of the changes introduced since then in the search results shortcode and how to adapt the tweak from Jeffrey? (I include it below for reference)
Thanks in advance
Kind regards,
Martin
in includes/shortcodes/search-results-shortcode.php
around line 303 search for :
$where = ” WHERE 1=1″
before that, insert:// added for Capacity Search $join .= ” INNER JOIN {$wpdb->postmeta} AS room_capacity_ids ON room_types.ID = room_capacity_ids.post_id AND room_capacity_ids.meta_key = ‘mphb_total_capacity’ “; then search for: (should now be around line 320) $order = ” GROUP BY room_type_ids.meta_value” before that, insert: // added for Capacity Search $where .= “and room_capacity_ids.meta_value >= “.$_REQUEST[‘mphb_adults’].” “;
May 16, 2024 at 2:01 pm #1618184Jeffrey DonchezParticipantdid you ever get an answer to this? I just updated to the new version and now am having the issue, and not even sure where to begin to look this time around..
May 16, 2024 at 11:50 pm #1618308Martin FourdrignierParticipantHi
No I did not have any answer on this point. I downgraded to the previous version and I am not updating the plugin anymore until this issue is solved.May 17, 2024 at 8:03 am #1618612Jeffrey DonchezParticipantwell, I do 🙂
in function getMinRate_shortcode_fn($atts) {
change:
$nights = MPHB()->getRulesChecker()->reservationRules()->getMinDaysAllSeason( $rate->getRoomTypeId() );to:
$nights = MPHB()->getRoomsAvailabilityCoreAPIFacade()->getMinStayNightsCountForAllSeasons($rate->getRoomTypeId());June 2, 2024 at 12:36 pm #1626512Martin FourdrignierParticipantThanks so much for the hint! I tried to find the function you are referring to in the search-results-shortcode.php, but without success. Maybe you were referring to another file?
June 6, 2024 at 9:57 am #1628553KasParticipantHi!
I am amazed that almost 4 years since the very first post this issue still have not been fixed and search results are not working correctly…June 7, 2024 at 6:37 am #1628889J. DavisKeymasterHi Kaspars, Thanks for your reply, however, I can not agree it is an issue or bug. It is rather a new feature. We will update it once we have any news.
July 1, 2024 at 6:57 am #1638610Jeffrey DonchezParticipantI actually put it in my functions.php and did a
add_shortcode( ‘grab_min_price’, ‘getMinRate_shortcode_fn’ );
then anywhere I want to show the minimum price, I put [grab_min_price]
October 1, 2024 at 2:55 pm #1675284Paul DomiterParticipantHi,
I just bought the whole bundle just to find out that the max capacity is not taken into account in the recommended search results…This functionality is not a new feature. It is a basic expected behaviour of a search form for accomodation.
If I am searching for accomodation for 6 adults and 6 children and i end up with a recommendation of booking one apartment with a max capacity of 6 people, then there is definitely something wrong with the search results.
No matter how you try to phrase it, to make it sound OK, it simply does not work as all of us would expect it to work.
As I can see this topic is open for the lat 4 years. If you are not even trying to fix this, then please at least let us know that you won’t.
If you are working on a fix, then let us know an ETA for that, so we all can decide if we should support your plugin or search for a diffent solution.
October 3, 2024 at 7:35 am #1676296J. DavisKeymasterHi Paul, there were at least 3 questions discussed in this topic for example ability to add a featured image of the recommended properties; adjust it to the total capacity; and the ability to display the search results that match the selected capacity in a search form.
The Recommendation Section is optional and can be disabled at Accommodation > Settings if it does not meet your requirements.
We collect feedback on these requests. I’ve added your upvote as well. Any of the tasks are not selected for development yet so there is no ETA for now. I will update the topic once I have any news. Thanks. - AuthorPosts
- You must be logged in to reply to this topic.