Hi!
The results of the room search block display the availability calendars only if the search result is positive. If there is no room available, the "please enter another date ...." message is displayed, but NOT the availability calendars.
I think it should be quite the opposite. Why should the customer check the availability, if rooms are available on the requested dates? On the other side, if rooms are not available, it would be practical to check availability instead of entering random dates in the search form.

Panos

CommentFileSizeAuthor
#3 hotel_calendars_multi.tar_.gz4.79 KBlarowlan

Comments

larowlan’s picture

Fair point, anyone else got an opinion on it?
I assume the search results would show those available at the top?

panayotis’s picture

I assume the search results would show those available at the top?

I do not mean the display of the search results. My point is, that besides the search results the (collapsed) availability calendars are displayed. I think (though no expert) it is controlled by

<div class="hotel-booking-search-addtl-details">
        <?php print $room['pricing']?>
        <?php if($room['calendar']) : ?>
          <?php print $room['calendar'];?>
      

in hotel_booking_search_results.tpl.php. However, if the search for a room has no result

<?php elseif ($no_results): ?>
  <div class="hotel-booking-no-results"><?php print $no_results; ?></div>
<?php endif; ?>

without displaying any availability calendars. Unfortunately I don't know how to display the availability calendar in that case, which should be pretty easy.

Panos

larowlan’s picture

StatusFileSize
new4.79 KB

Oh, now I get it.
I once wrote a 'multi-calendar' module that showed availability for all of the nodes (this was for v1 I think).
So that's the kind of thing you'd need - because you'd want to show the availability for all of the nodes on the site.
It's attached here if you (or anyone else) want to have a go at porting it to the 6.x.2.x-dev version - I'd be happy to put it in with the module. I think the only thing that would need changing is the query that generates the listing, it would need updating to the newer table and field names in the 2.x version (you can see function hotel_booking_update_6200 in hotel_booking.install to see what these changes were).
Then you'd just need to include that in the search results when there were no matching results.

panayotis’s picture

Thanks a lot, I will try it out. I think changing the field names should be no problem even for a layman like me. However, how do I call it from hotel_booking_search_results.tpl.php?

larowlan’s picture

You'd need to replicate elements of the logic of the function hotel_calendars_multi_calendar.
I see that the module also uses the old v1 calendar tip logic, ideally this should use beauty tips but if you don't have restrictions - you needn't worry.

halter’s picture

Category: feature » support
Priority: Normal » Critical

can u please the version which works with uc_hotel-6.x-2.x-dev properly because i'm new in drupal? What i must do to make hotel_calendars_multi_calendar work? Must I put file in hotel_booking directory?

larowlan’s picture

Priority: Critical » Normal

hi @halter welcome to drupal please don't hijack existing threads, this was a feature request - create a new one.
Please see the definitions of priority here: http://drupal.org/node/45111