Don't require payment information for multiple participant event registration if all amounts are 0
Eg. you have a priceset with two or more line items. The discount code applies 100% discount to all lineitems.
Previous behaviour:
Payment information is shown if "how many people are you registering" is > 1.
New behaviour:
Payment information is shown if "how many people are you registering" is > 1 and any of the priceset lines have an amount > 0.
Implementation
When the discount is calculated some information about the details of the discount are set in CRM.vars.cividiscount
. A new javascript file (js/event.js) reads these variables and hides the payment block if all lineitems are 0.
By default CiviCRM does not do this because it doesn't know if all lineitems are 0. It assumes that if there are multiple participants that you might choose a paid option for one of the other participants. But if you have a 100% discount applied across all lineitems all participants will be free.
Merge request reports
Activity
mentioned in issue stripe#237 (closed)
Thanks @mattwire will test this.
added 1 commit
- b9fcedb5 - Set the applyToAllLineItems flag if all the lineitems on the form were...
@justinfreeman have you tested this?
@colemanw thanks for the reminder. Really need that Gitlab auto reminder system rolled out!
mentioned in commit cbf036aa
mentioned in issue #299
mentioned in merge request !288