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

MembershipTypeValues Hook loses altered minimum_fee value for any array items other than the first one at the Confirm step

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.5, 3.2
    • Fix Version/s: 3.1.6
    • Component/s: CiviMember
    • Labels:
      None

      Description

      http://forum.civicrm.org/index.php/topic,14275.msg62097.html#msg62097

      I've confirmed this bug in 3.2 using the following simple hook invocation in a test module. Both membership types show the correctly altered fee on Main.php. And if I test by selecting the first membership type ('General') - it works all the through. However, if I select the 2nd option ('Student') - then the original fee ($50) shows on the confirm page and the membership is created w/ a $50 contribution instead of the hook specified $2.22.

      =================

      function dgg_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
      for ($i=1; $i <= count($membershipTypeValues); $i++) {
      if ($membershipTypeValues[$i]['name'] == 'General')

      { $membershipTypeValues[$i]['minimum_fee'] = "5.55"; }

      if ($membershipTypeValues[$i]['name'] == 'Student')

      { $membershipTypeValues[$i]['minimum_fee'] = "2.22"; }

      }
      }

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: