I've got a scenario where my client wants to take single and group registrations (which is fine) but they also do "family" registrations and for those, there's a price cap. Is there a way to have the system check to see if they've clicked a "family registration" button on the form and have it do the math, and if they're over a certain price, have it drop the price to a certain amount?
You can not set an actual price cap, but you can get the same result with group registrations. Say the cost is $20 per person but there is a cap of $60. You can set the group rates like this:
You would not need a price for 2 or 3 (in this example) because the price would still calculate $20/person for 1-3 people, then change the calculation once you have 4 or more people in the group. Hope that does the trick for you.
It would if the price per person was always the same...but we have a youth/child price that's lower than the adult. I suppose I could somehow do the math and figure out how many people it would take to hit the max, but if you had 1 adult and say, 4 kids, you wouldn't hit it as fast as if you had 4 adults, so it might not come out quite right.
Anyway, for now I think I'll put a notice in the side bar that says if your registration cost for a family is over a certain limit, you need to use our pdf form.
I figured out a way to hack it to do what I want. The solution isn't perfectly general, but it works for my situation.
In your Event, remove all group rates, and use a Required Partial Payment equal to the family cap. In components/com_dtregister/dtregister.php, replace this line:
With this change, DT Register will not alter the payment amount unless it's bigger than the Partial Payment/cap.
Caveats:
In the backend, records for registrations over the family cap will show up as Not Paid. You have to go in manually and correct them. For me, I will not be taking that many family registrations, so it's not a big deal.
You need to make some changes to the language file (e.g., Deposit Amount -> Payment Amount; I also replaced all "group" references with "family" and "member" references with "family member") and your Custom Thank You Email ("Your registration fee is $[AMOUNT] (if this is more than the $70 family cap, you only need to pay $70).") for this to not be too confusing to the end user.