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

Premium minimum price isn't checked if Amounts Block is deselected

    Details

      Description

      Matching of the amount paid vs the minimum amount required for premiums occurs only if the Amounts Block is activated in the contribution page.

      So pages with membership amounts only, or using price sets, do not get checked for the premium minimum price. So, for example, a user could donate $12 and select a premium worth $2000, and no error occurs.

      In 4.2 the error is blatantly exposed. In 4.3 the new ajax-y premium selection method appears to cover up the error in most situations but the bug is still in the underlying code.

      The fix is simple--just remove one && statement around line 901 of CRM/Contribute/Form/Contribution/Main.php, like this:

      if (isset($fields['selectProduct']) &&
      $fields['selectProduct'] != 'no_thanks'
      //&& $self->_values['amount_block_is_active']
      ) {
      $productDAO = new CRM_Contribute_DAO_Product();
      $productDAO->id = $fields['selectProduct'];
      $productDAO->find(TRUE);
      $min_amount = $productDAO->min_contribution;

      More info about the issue and solution here:

      http://forum.civicrm.org/index.php/topic,27783.0.html

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              bhugh Brent Hugh
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 minutes
                5m
                Remaining:
                Remaining Estimate - 5 minutes
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified