CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Price set participant management
Pages: [1]

Author Topic: Price set participant management  (Read 3334 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Price set participant management
November 27, 2011, 07:09:20 pm
 I’ve been getting some feedback from customers about price sets in conjunction with events. The points she’s making seem to me to be valid & I’d like to get your feedback (not sure whether this will lead to any immediate implementation or not but I’d appreciate confirmation or otherwise of the situation & best approach to fixing).

Basically I think the situation is that price sets are being used for things like workshops where there are multiple workshops within one event. This seems like a different, but valid, use case compared to what was originally planned for. Here’s what seems like a simple example to me

•   Event can take 50 participants
•   Each participant chooses a morning & afternoon workshop - there are two options for each & each can take a max of 25 participants (ie. so between the 50 people they choose 100 workshops).

In this use case Price sets currently allow you to manage the number of participants in each option OR the number of participants contributing to the event.

i.e each price_field_value lets you determine the ‘max_value’ – the number that can subscribe to that option and ‘count’ – a Boolean that determines whether or not the item counts towards BOTH the option AND the event count. So, because you want each person to select 2 options you will count each person twice towards the event participant.

A related issue (which also ties in with the ‘is_deductible’ / financial code issue) is that if you use a check box rather than a select type field you don’t get the option to specify the ‘max_value’, ‘count’ (or in future the financial_type);

It seems that we either need to add another column ‘count_participant’ to differentiate from ‘count towards max value’ or introduce options on ‘count’ other than BOOLEAN. I’m thinking this won’t be too big a change.

Is my logic right? Is there something I haven’t considered?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Price set participant management
November 28, 2011, 06:25:44 am
These are good, small, localized fixes, and we should move ahead with them.

It would be better in the long run to look at 'hierarchical' events. Then each breakout session could have a time, a location (like a room), and a max_participants count (based on the size of the room available). It would also allow more information to be saved and displayed about the topic of the breakout. If the 'sub-events' are the classes in a course, or the luncheon speeches in a Workshop series, then the dates of these 'sub-events' could also be conveniently stored and displayed.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Price set participant management
November 28, 2011, 02:34:49 pm
Eileen - before we look at solutions, we need to get on the same page in term of how the current code and schema work. See inline comments below.

Quote from: Eileen on November 27, 2011, 07:09:20 pm
In this use case Price sets currently allow you to manage the number of participants in each option OR the number of participants contributing to the event.

i.e each price_field_value lets you determine the ‘max_value’ – the number that can subscribe to that option and ‘count’ – a Boolean that determines whether or not the item counts towards BOTH the option AND the event count. So, because you want each person to select 2 options you will count each person twice towards the event participant.

My understanding is that civicrm_price_field_value.count is an integer whose purpose is to determine whether to "increment the number of registered participants per unit against the maximum number of participants allowed for this event. For example, if this price field is for a table at a fundraiser which seats eight people, you would set Participant Count to 8." So this is not a boolean, but a "multiplier".

I might be thinking about this incorrectly, but for the use case described it seems to me that you could set Participant Count (count) = 1 and Maximum Participants (max_value) = 25 for each workshop, and that would work as desired (caveat - haven't tested this).

Quote from: Eileen on November 27, 2011, 07:09:20 pm
A related issue (which also ties in with the ‘is_deductible’ / financial code issue) is that if you use a check box rather than a select type field you don’t get the option to specify the ‘max_value’, ‘count’ (or in future the financial_type);

I'm not seeing this issue. I get Count and Max Participants input fields for Checkbox price set fields (as well as the other field types).
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Price set participant management
November 28, 2011, 02:53:34 pm
Quote
I might be thinking about this incorrectly, but for the use case described it seems to me that you could set Participant Count (count) = 1 and Maximum Participants (max_value) = 25 for each workshop, and that would work as desired (caveat - haven't tested this).

It seems that if I set the count to 1 and each person registers for 2 workshops then that counts as 100 participants rather than 50 (so they get blocked from registering) - this is from my customer's testing. In this case you could possibly set the 'count' to .5 & the max_value to 12.5 & it would work but this is quite a simplified scenario as there are often options where they may choose to sit out a particular workshop (or meal or whatever).
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Price set participant management
November 29, 2011, 08:35:03 am
Do they care about the 100 total for the event in this case? Seems like the important thing is that there is room for up to 25 in each workshop session. If so, then I "think" you can not set max=100 at event level but just use the max participants at the price_field_value level to make sure each workshop only allows 25.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Price set participant management
November 29, 2011, 12:31:35 pm
They care about the 50 total for the event - this is a pretty common situation - a maximum total participants & those participants attend several things throughout the day. The total number of workshop bookings will be more than 50.

They want to have a limit on the total participants & a limit on the number in each workshop (think something like CiviCon - you can fit 100 in the venue but only 40 in each of the rooms for each session - you want to limit the total to 100 & the sessions to no more than 40. You have a half dozen sessions throughout the day & people can choose which ones they will attend when they book)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Price set participant management
November 29, 2011, 01:52:16 pm
Ok - what happens if you don't enter a value in the Participant Count field. Lobo thinks this will result in each purchased option (workshop) being decremented against it's own Max Participants but not against the event max. The event max would be affected only by the number of registered participants (which is what you want). Have you tested this?
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Price set participant management
November 29, 2011, 02:11:48 pm
I can double check but my understanding at the moment is that the participant won't count at all towards the event max in this scenario.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Price set participant management
December 01, 2011, 05:46:11 am
I am one of the customers Eileen referred to.  I am afraid I have led her astray.  I had always assumed I had to put a value in "participant count" in a price option if I wanted to to set a maximum number of participants for that option, but having just done some testing I can see that I don't need to. This means that the current logic works fine in terms of both a maximum number for a price option and for a price set as a whole - if you know how to use it.  I obviously didn't.

So, a couple of suggestions:
  • Can the comment icon explaining the use of the Participant count field be added to the Edit window for a price option (I was in this window when I first tried to set this up and incorrectly extrapolated what I new from v3.2) 
  • Could something like the following be added to the comment:
    If you do not want this option to increment the participant count for the event you can still restrict how many times this particular option can be chosen.  Leave this empty and enter a value in the adjacent Max Participant box.  For example, if you leave this empty and set the adjacent Max Participant = 20, only 20 registrants can choose this option before it becomes unavailable to online registrants.

A couple of observations:
  • The receipts will be a little confusing as someone could choose an option and be charged for that option but will have 0 in the' total participants' column for that option.
  • My receipts will no longer say 'total participant count = 3' when one person has chosen options in 3 different sessions.( A big plus)

 
And a comment:
Perhaps I have at last found a contribution I can make - I will have a go at revising the section of the Floss manual that deals with Price Sets as I do not think it is very clear (perhaps this section hasn't been revised since the ability to set a maximum number on the price option level was introduced.)


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Price set participant management
December 01, 2011, 04:15:51 pm
Awesome report back!!
I'll update the help / add help to price option edit form. Your explanation is super clear.

... looking forward to your edits / improvements in the FLOSS manual Price Sets section. Please make your updates on the latest revision - starting from here: http://booki.flossmanuals.net/civicrm/_edit/
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Price set participant management

This forum was archived on 2017-11-26.