3

After some wrangling with ideas on how to make registration easier for participants I've come up against a problem and wonder if CiviCRM can even be used to fix the issue without a tremendous amount of custom coding. I'm looking for ideas on how to overcome the issue.

Brief site description Our site runs 10 events a year for two groups: Students and Instructors. Members from both groups log in and sign up for events they will attend. Instructors don't pay but Students do. In fact, Students receive a discount if they sign up for more than one event. If they sign up for a single event early, they get a discount but early and 'bulk' discounts are not combined.

Easy Registration Rather than create 20 events (10 for students, 10 for instructors) I create 2 'super registration' events (one for students, one for instructors) that allows registration to any or all of the events. In the event I have a checkbox list with 5 choices, of which any number of choice can be selected.

Event 1: Apr 29-30 Event 2: June 1-2, Event 3: July 10-11 etc . . .

Pricing is listed as:

ONE Event: $100 TWO Events: $180 THREE Events: $270 . . . .

Problem 1: I cannot find a method to force the number of event choices to the correct corresponding price. For example, Student picks Event 1 and 3, but then only picks ONE Event for pricing 'accidentally' paying for one, rather than two events. This requires 'administrative intervention' in the form of an email (Dear user so sorry to see you can't count. Pay for the correct number of events or we're only signing you up for the number you paid for). Be great if I could somehow count the number of selected events and force that price.

Is there a way to do this?

Problem 2: While using CiviReports and Excel is fine to manage the two super events I was wonder if I could use CiviCRM to manage all events. I was thinking, create my user accessible 'super event' but also create admin-access only events to track which users are actually going to which event. For example:

Event List Student Registration event - allow users to sign up for any number of events Student Event 1 (for admins only) - Track whose coming to event 1 Student Event 2 (for admins only) - Track whose coming to event 2 Student Event 3 (for admins only) - Track whose coming to event 3

dito for instructors

Is there a way to do this?

I've considered the shopping cart but it still forces users to pick each event, put it in a cart, pay and the bulk pricing becomes tricky as the percentage of discount changes depending on number of events picked. The shopping cart is still a bit creaky too. The 'super event' is pretty popular with users so I'd like to keep it.

1

I certainly would investigate the CiviDiscount extension: https://civicrm.org/extensions/cividiscount

It might already bring functionality that would be close to what you need, if not... it has it's own API, so a custom extension that would meet your needs would be smaller with CiviDiscount then without.

0

I think both of your questions need custom code, but not a whole lot.

For question 1, use hook_civicrm_validateForm. Count the number of events they selected and ensure it matches the number of events they paid for. If not, raise an error. You can write this in a few lines of code, if you are (or have access to) someone who codes such thing.

For question 2...hmm. If you're using Civi 4.6+, you can create a recurring event as a way to easily create 10 events at once. And I can imagine some sort of hook_civicrm_post hook on Participant records. It could check if your event type is "super event", and if so, parses the values in it and creates Participant records on the "regular" events for those users. Doing that such that you won't have to edit the code for each new super event is a little trickier; I'm sure it can be done, but might need some clever data structuring.

  • The idea of using validateForm seems like it may indeed do what I need but I'm not very experienced with CiviCRM in general. Is there a general HowTo or getting started guide with examples for coding Civi? – carclubadmin Jan 11 '16 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.