Hello,

I need to add a $11.50 supplement for every person over the first two staying in a room. When I add it to the options, it only calculates it for one night on the total amount and doesn't multiply it by the number of nights the guest is staying. I tried calculating it as a percentage of the room rate but that percentage varies depending on the number of nights as well. Is there a way to add this option through the system?

Many thanks,

M

CommentFileSizeAuthor
#2 Supplement_Rule.txt2.6 KB1an_m
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lilbebel’s picture

I should also add that I have configured the rooms to be charged per room and not per person and this needs to stay that way. So, how to keep the room on a room charge and the extra people on a per person charge?

Any thoughts?

1an_m’s picture

This should be possible via Rules (see attachment for example rule exported as txt file)

Unfortunately it does not work, since the rooms-booking-number-people field for the line item is set to the max possible for the room, rather than the Group size selected by the customer on the Availability Search page - see related issue #2013457: Group size not passed to commerce-line-item:rooms-booking-number-people

lilbebel’s picture

Thanks Ian. That's too bad. I'll just recommend to my client that they add the supplement themselves to the final invoice for now.

LeDucDuBleuet’s picture

I just posted a patch on the other issue to make this kind of rules work for that use case :
https://drupal.org/node/2013457#comment-7847809
Hope this helps!
And thanks a million to 1an_m for the rule example, you saved my day!

jwilson3’s picture

Title: How can I enter a per person per night supplement option » Per person per night supplemental Rooms options
Issue summary: View changes
plopesc’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Closed (duplicate)
plopesc’s picture

Status: Closed (duplicate) » Active

Sorry, I read it wrong. #2143511: Problems with the options added option per night, but not per night and person.

jackdaniel9’s picture

Line 1168 in rooms_booking_manager.module

All options multiply by group size

It's good solution??

$price_modifiers[$option_name] = array(
                '#name' => $option['name'],
                '#type' => ROOMS_DYNAMIC_MODIFIER,
                '#op_type' => $option['operation'],
           -   '#amount' => $option['value'], 
           +  '#amount' => $option['value'] * $group_size, 
                '#quantity' => $quantity,
 );