Answers.Body: <p>To my knowledge you have started in the right path and that would be the best way to process priceset - yes BuildAmount hook is used for handling the priceset amount </p>
  
  <p>Also I guess you should have already known about discount module if not please refer to the link below - If this works in anyway </p>
  
  <p>refer -  <a href="https://civicrm.org/extensions/cividiscount" rel="nofollow">https://civicrm.org/extensions/cividiscount</a></p>
  
  <p>All the best - I guess this helps !!!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T15:44:05.983Z
Answers.Text: Thanks Ramesh. I saw Cividiscount, but skimming the info I didn't see a way to do what I was looking for. At least not without having participants manually enter a code. Fantastic extension though.
Answers.UserDisplayName: Rachel Olivero
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T15:52:42.603Z
Answers.Text: Yes for more function hook would be better
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T15:37:34.180Z
Answers.LastActivityDate: 2016-08-10T15:37:34.180Z
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Body: <p>I'm working on a child care event for a conference. The way the pricing is set up, you have different sessions for child care with a discount applied for two or more children in the same session. So:</p>
  
  <ul>
  <li>Saturday all day ($30 1 child; $40 2 or more children)</li>
  <li>Saturday morning ($15 1 child; $25 2 or more)</li>
  <li>Saturday afternoon ($15 1 child; $25 2 or more)</li>
  </ul>
  
  <p>I am assuming in order to do this the way it's structured I have to use hooks to modify pricing? I'm assuming civicrm_buildAmount is the appropriate hook. Any suggestions on how to approach what I'm trying to do. I'm not entirely sure how I would review all price sets for registrants to say (pseudo code):</p>
  
  <p>if ( more than one registrant selects $option['saturday all day']) {
     $option['amount'] = 40/total registrants selecting this option
  }</p>
  
  <p>Any thoughts are appreciated.</p>
  
  <p>Thanks,
  Rachel</p>
  
Tags: <civievent><civicontribute><cividiscount>
Title: Event Discount Based on Number of Participants Selecting Price Set Option
ThreadText: # Event Discount Based on Number of Participants Selecting Price Set Option
  
  (Asked by: username_0 on 2016-08-10)
  
  I'm working on a child care event for a conference. The way the pricing is set up, you have different sessions for child care with a discount applied for two or more children in the same session. So:
  
  * Saturday all day ($30 1 child; $40 2 or more children)
  * Saturday morning ($15 1 child; $25 2 or more)
  * Saturday afternoon ($15 1 child; $25 2 or more)
  
  I am assuming in order to do this the way it's structured I have to use hooks to modify pricing? I'm assuming civicrm\_buildAmount is the appropriate hook. Any suggestions on how to approach what I'm trying to do. I'm not entirely sure how I would review all price sets for registrants to say (pseudo code):
  
  if ( more than one registrant selects $option['saturday all day']) {
  $option['amount'] = 40/total registrants selecting this option
  }
  
  Any thoughts are appreciated.
  
  Thanks,
  username_0
  
  **Tags:** civievent, civicontribute, cividiscount
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-10. Score: 1
  
  To my knowledge you have started in the right path and that would be the best way to process priceset - yes BuildAmount hook is used for handling the priceset amount
  
  Also I guess you should have already known about discount module if not please refer to the link below - If this works in anyway
  
  refer - <https://civicrm.org/extensions/cividiscount>
  
  All the best - I guess this helps !!!
  
  > **Comments:**
  > **username_0**: Thanks username_1. I saw Cividiscount, but skimming the info I didn't see a way to do what I was looking for. At least not without having participants manually enter a code. Fantastic extension though.  
  > **username_1**: Yes for more function hook would be better  
  
  ---
  
  