Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13004

Create discount transaction fails for event price sets that do not use radio buttons

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.4.0
    • Component/s: Accounting Integration
    • Labels:
      None

      Description

      I created an Event price set with 2 SELECT fields (see screenshot). When I do online registration, I get this notice on the Thank-you page:

      Notice: Undefined index: amount_priceset_level_radio in CRM_Event_Form_Registration_Confirm::processContribution() (line 991 of /Users/dgg/git/crm_v4.3/CRM/Event/Form/Registration/Confirm.php).

      I did a dump of the $params array above that line (screenshot attached) and instead of the expected 'amount_priceset_level_radio' element, I have 'amount_priceset_level_select'. The code needs to be refactored to handle the fact that the price set will not always have a radio button as it's first field (or at all). With the current code - the call to CRM_Event_BAO_Participant::createDiscountTrxn fails.

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: