Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviDiscount
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • CiviDiscount
  • Merge requests
  • !275

Don't require payment information for multiple participant event registration if all amounts are 0

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged mattwire requested to merge mattwire/cividiscount:multipleparticipant into master Jun 11, 2022
  • Overview 3
  • Commits 2
  • Pipelines 0
  • Changes 2

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: multipleparticipant