Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.9, 4.3.5
-
Fix Version/s: 4.4.0
-
Component/s: CiviContribute
-
Labels:
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: