Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | Supplement_Rule.txt | 2.6 KB | 1an_m |
Comments
Comment #1
lilbebel CreditAttribution: lilbebel commentedI 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?
Comment #2
1an_m CreditAttribution: 1an_m commentedThis 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
Comment #3
lilbebel CreditAttribution: lilbebel commentedThanks Ian. That's too bad. I'll just recommend to my client that they add the supplement themselves to the final invoice for now.
Comment #4
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedI 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!
Comment #5
jwilson3Comment #6
plopescThis has been done in #2143511: Problems with the optionsComment #7
plopescSorry, I read it wrong. #2143511: Problems with the options added option per night, but not per night and person.
Comment #8
jackdaniel9 CreditAttribution: jackdaniel9 as a volunteer commentedLine 1168 in rooms_booking_manager.module
All options multiply by group size
It's good solution??