Answers.Body: <p>If you're on Drupal - I recommend you use Webform CiviCRM module - <a href="https://www.drupal.org/project/webform_civicrm" rel="nofollow noreferrer">https://www.drupal.org/project/webform_civicrm</a> - It will let you built a cart (multiple Events, fee-options, discount codes, etc) and leverage all native Drupal Webform options (like Conditionals) to build your fees without requiring any code. </p>
  
  <p>If your CiviCRM is not attached to Drupal - then your options are to either help fund improvements [contact the Core Team - they have a paid Issue queue <a href="https://civicrm.org/paid-issue-queue" rel="nofollow noreferrer">https://civicrm.org/paid-issue-queue</a> ] or get on Mattermost chat.civicrm.org - to see if you can team up with developers/other orgs that are interested in improving the native CiviCRM Cart Checkout.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-10T13:35:06.437Z
Answers.Text: Thanks. This site is on WordPress so WebForm not an option.  
    
  I can submit an issue and my suggested changes for CiviEvent if it looks like a sensible fix. It feels like a bug to me or at least not the behaviour I'd expect. But it would be nice if someone agreed - or not.  
    
  I'm not using the Cart Checkout but might look at it at some point. I was wondering if anyone was using it currently.
Answers.UserDisplayName: chriscant
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-10T17:10:43.037Z
Answers.Text: Try reach out in Mattermost -> Wordpress channel; to see what others think. I think that's your best course of action.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-09T14:50:07.710Z
Answers.LastActivityDate: 2018-08-09T14:50:07.710Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>I'm not 100% sure of precisely what your organization's needs are, but since you mentioned CiviCRM Event Cart, so you know, there's two extensions currently under development that integrate with CiviCRM's Event Cart feature that might meet some of your needs. They're under active development, and you can check them out on CiviCRM's GitLab. </p>
  
  <p><a href="https://lab.civicrm.org/extensions/boxoffice" rel="nofollow noreferrer">boxoffice</a>: Provides a lighter workflow for the CiviCRM Event Cart. Designed for a ticket box office (ex: where you do not need the names of other participants).</p>
  
  <p><a href="https://lab.civicrm.org/extensions/eventpack" rel="nofollow noreferrer">eventpack</a>: Provides a way to bundle events together (at a discounted price) in the CiviCRM Event Cart (and the Boxoffice extension).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-14T21:36:04.750Z
Answers.LastActivityDate: 2019-06-14T21:36:04.750Z
Answers.UserDisplayName: cmtool
Body: <p>I've set up a paid-for event with online registration which uses a price set where a user can choose how many tickets they want in each of the available types and optionally add a donation (by entering multiples of £1).</p>
  
  <p>It seems that a user can enter fractions and negative values in any field. And they can also not select anything but can continue.</p>
  
  <p>I've done a temporary fix to test for fractions and negative values in a custom extension by adding some JavaScript in templates/CRM/Price/Form/Calculate.tpl and some extra validation code in CRM/Event/Form/Registration.php</p>
  
  <p>Is there a better/recommended way of doing this? This would seem like a common requirement.</p>
  
  <p>PS  The CiviEvent Cart Checkout looks useful but is described as being in an Alpha state. Anyone using it successfully?
  <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/CiviEvent+Cart+Checkout" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/CiviEvent+Cart+Checkout</a></p>
  
  <p>Thanks in advance.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-31T12:59:26.260Z
Comments.Text: We've also now found that (when using price sets at least) people can register for events without having chosen a ticket. I've added some more code in CRM/Event/Form/Registration.php to add up a count of participants (where Participant Count set for a price set field) and report an error if zero (or less).
Comments.UserDisplayName: chriscant
Tags: <civievent><civicontribute>
Title: How to cope with CiviEvent user choices
ThreadText: # How to cope with CiviEvent user choices
  
  (Asked by: username_0 on 2018-08-09)
  
  I've set up a paid-for event with online registration which uses a price set where a user can choose how many tickets they want in each of the available types and optionally add a donation (by entering multiples of £1).
  
  It seems that a user can enter fractions and negative values in any field. And they can also not select anything but can continue.
  
  I've done a temporary fix to test for fractions and negative values in a custom extension by adding some JavaScript in templates/CRM/Price/Form/Calculate.tpl and some extra validation code in CRM/Event/Form/Registration.php
  
  Is there a better/recommended way of doing this? This would seem like a common requirement.
  
  PS The CiviEvent Cart Checkout looks useful but is described as being in an Alpha state. Anyone using it successfully?
  <https://wiki.civicrm.org/confluence/display/CRMDOC/CiviEvent+Cart+Checkout>
  
  Thanks in advance.
  
  **Tags:** civievent, civicontribute
  
  > **Comments:**
  > **username_0**: We've also now found that (when using price sets at least) people can register for events without having chosen a ticket. I've added some more code in CRM/Event/Form/Registration.php to add up a count of participants (where Participant Count set for a price set field) and report an error if zero (or less).  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-08-09. Score: 1
  
  If you're on Drupal - I recommend you use Webform CiviCRM module - <https://www.drupal.org/project/webform_civicrm> - It will let you built a cart (multiple Events, fee-options, discount codes, etc) and leverage all native Drupal Webform options (like Conditionals) to build your fees without requiring any code.
  
  If your CiviCRM is not attached to Drupal - then your options are to either help fund improvements [contact the Core Team - they have a paid Issue queue <https://civicrm.org/paid-issue-queue> ] or get on Mattermost chat.civicrm.org - to see if you can team up with developers/other orgs that are interested in improving the native CiviCRM Cart Checkout.
  
  > **Comments:**
  > **username_0**: Thanks. This site is on WordPress so WebForm not an option.      I can submit an issue and my suggested changes for CiviEvent if it looks like a sensible fix. It feels like a bug to me or at least not the behaviour I'd expect. But it would be nice if someone agreed - or not.      I'm not using the Cart Checkout but might look at it at some point. I was wondering if anyone was using it currently.  
  > **username_1**: Try reach out in Mattermost -> Wordpress channel; to see what others think. I think that's your best course of action.  
  
  ---
  
  ### Answer by username_2 on 2019-06-14. Score: 0
  
  I'm not 100% sure of precisely what your organization's needs are, but since you mentioned CiviCRM Event Cart, so you know, there's two extensions currently under development that integrate with CiviCRM's Event Cart feature that might meet some of your needs. They're under active development, and you can check them out on CiviCRM's GitLab.
  
  [boxoffice](https://lab.civicrm.org/extensions/boxoffice): Provides a lighter workflow for the CiviCRM Event Cart. Designed for a ticket box office (ex: where you do not need the names of other participants).
  
  [eventpack](https://lab.civicrm.org/extensions/eventpack): Provides a way to bundle events together (at a discounted price) in the CiviCRM Event Cart (and the Boxoffice extension).
  
  
  ---
  
  