Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Ability to give discounts based on multiple rooms, or length of stay, etc
Ability to only charge a deposit at checkout and display total due on arrival, where an admin can set the type of deposit: %, set amount, or first night.
And, where where "pay in full" can still be an option to the customer with a possible discount if they do choose to pay in full up front.
Comments
Comment #1
ronald_istos CreditAttribution: ronald_istos commentedYou will be glad to know that we have price modifier hooks in head and dev version of module.
The hook_price_modifier_alter is called everytime a price is calculated and you can step in from your own module (as show below) to modify the price.
You define a modifier type giving it a type (currently just ROOMS_DYNAMIC_MODIFIER), an operation type (ROOMS_ADD, ROOMS_SUB, ROOMS_REPLACE, ROOMS_INCREASE, ROOMS_DECREASE) and the actual value. In the case of increase and decrease the value is consider a percentage so 10 would be 10%.
This needs more work and more documentation but the basics are finally in place.
Comment #2
CodigoVision CreditAttribution: CodigoVision commentedexcellent news, thanks for the update!
Comment #3
urlaub CreditAttribution: urlaub commentedA good solution if you only charge a deposit at checkout after reservation.
But what if I want to charge the remaing balance not on arrival, but for example 30 days before departure date? In this case the deposit would be kind of an partial payment of the order. Does that work out of the box with rooms? A d6-uc module with a related function would be: http://drupal.org/project/uc_downpayment
In combination the "pay in full" option would be a great feature as well, in order to offer early bird discounts.
Comment #4
hurdygurdy CreditAttribution: hurdygurdy commentedI wondered about this also. My use case is an equipment rental where renting a particular item the first day costs a certain amount, and every subsequent day's rental fee is discounted, and a week's rental is a fixed price. Is it possible to do that with the price modifier function? Apply prices per day and per resource type?
Comment #5
pbrough CreditAttribution: pbrough commentedI have been trying to implement this but there is an error in the code for the module.
Will provide a discount of 10 and not a %. To give a % discount you need to use:
The hooks, ROOMS_ADD and ROOMS_SUB modify the price based on a fixed value. ROOMS_INCREASE and ROOMS_DECREASE modify the price based on a percentage.
Comment #6
fchandler CreditAttribution: fchandler commentedI am trying to do this as well, but getting nowhere. Admittedly I don't really know how to code in php. Here is what I did for my info file.
and the module file
On Commerce's website they suggested creating a new product and apply it with rules, but there is one product (Rooms Basic Booking) and two product types (product and rooms product). I was thinking it would be creating a rooms product. Sorry I am a front end developer and content manager and am trying to break out of my box.
Comment #7
CodigoVision CreditAttribution: CodigoVision commentedMake sure your function name matches your module name:
function rooms_deposit_rooms_price_modifier_alter
Comment #8
AdamPS CreditAttribution: AdamPS commented1) The interface seems to have changed (oops breaks existing hooks - maybe wasn't a good idea?), there is a mandatory #quantity parameter.
2) Typically we don't want a discount that applies to every booking (else just make the price less!), rather only in certain cases.
Here is some example code that applies a discount for long stay bookings: 5% for 6+ days and 10% for 13+ days.
Comment #9
nandwabee CreditAttribution: nandwabee commentedHow would you go about setting different pricing for foreigners and citizens?
Trying to hack around using price modifiers without much success?
Comment #10
ITWest-jg CreditAttribution: ITWest-jg commentedWhen searching for availability price_modifiers contains data from other units.
Comment #11
gorobinson CreditAttribution: gorobinson commentedInterested in the first two features outlined here. Has anybody had any success with implementation and can share tips/instructions.
Length of stay based discounts
The php code shared by AdamPS looks perfect but not sure how best to implement as its own module (new to drupal/php). Any tips?
Deposit and payment framework
Also keen to set this up along the following lines;
User sends booking request > Rooms manager reviews and rejects/approves > Request sent for user to pay deposit (25%) or full amount > Request sent for outstanding balance due 6 weeks before start date > Once full payment received, property booking instructions sent
Has anyone had any success? I've seen references to http://drupal.org/project/uc_downpayment and other modules but no confirmed examples or implementation instructions.
Comment #12
Finabluma CreditAttribution: Finabluma commentedHi, I wonder how we can filtre the price_modifier by unit-types? Could anyone give some tip about this?
Comment #13
Finabluma CreditAttribution: Finabluma commentedSorry, I asked for something that it was easy to solve. With a few lines is been fixed.
Comment #14
Finabluma CreditAttribution: Finabluma commentedHi! I'm quite lost on this. I managed to alter $pricemodifiers depending the searchings. But now I would like to print on the search_results page the modifier applied to a certain search result. I want to do this just to show the increment we add to the final price. I guess that with a couple lines we should do this but I have no clue how to do it. I would really appreciate if anyone could give me some tips to solve this. I attached the function to alter the price modifier just in case that helps to clarify what i'm looking for.
Comment #15
Finabluma CreditAttribution: Finabluma commentedDoes anyone knows how to render the pricemodifier applied independently the total price? I'd really appreciate if anyone could give some tips. I need to render them on the page as info to the visitor. I've trying for some while to solve by myself but without results :(