Releasing Rooms 1.5 | Roomify

Releasing Rooms 1.5

by
Roomify
 
Today we released
 
This release fixes a number of issues and introduces an oft-requested featured which is the visualization of arrival and departure dates on the calendars in a way that better indicates the day of departure and arrival.
In addition, we introduce a number of improvements at the code level that will make it easier for you to customize Rooms.

Alter prices before price modifiers applied

Price modifiers allow you to perform a number of operations on the price after it has been calculated through the pricing calendar. But what if you have a more complex operation that needs to change the price coming from the pricing calendar before price modifiers are applied. This is what the following hook allows you to do.
hook_rooms_booking_amount_before_modifiers_alter(&$price, $booking_info)
This enables module developers to change the price that was calculated by the pricing calendar but before price modifiers are applied. This is particularly useful for those looking to completely bypass the pricing calendar (but still make use of price modifiers) or for those that need to apply operations on prices that are more complex to what price modifiers can do.
 

Alter key Rooms messages

 
Finally we also introduced a way to change Rooms strings that can take into account the context within which the string was created.
function hook_rooms_string_alter(&$string_suggestions, $context) {
  if ($context['#purpose'] == 'rooms_create_line_item') {

    // Alter the line item label to add additional information about the unit.
    $string_suggestions[] = $string_suggestions[0] . ' maximum guests: ' .
                            $context['#data']['unit']['unit']->max_sleeps;
  }
}
 
With the hook_rooms_string_alter alter you can change the information shown to the user with knowledge of where that information is coming from and the purpose. This will save considerably on complicated form alters. There is not full support for all strings yet - just a few key ones but we will be adding support for more in subsequent versions.
 
Speaking of subsequent versions we are happy to say that the frequency will change significantly now that Rooms is backed by a dedicated team through Roomify. We will be aiming for releases every 4-6 weeks so as to never leave things too far behind.
 
We would love to hear more about how you are using Rooms or what new features you would like to see. Get in touch or hit us up on
 
 

Add comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.