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

Online contribution page with price set: Payment method block should be hidden when total selected amount is $0

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5.2
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      $0 contributions result in the billing block being hidden - but I think the payment selector should be hidden as well.

      To test you need to enable more than one payment option & have a price set with a $0 option. When $0 is selected the billing block is hidden but you still get to chose between credit card & pay later which I think it probably an over-sight rather than a design choice.

      This is the code we are trialling (on 4.4 patched with CRM-14882)

      +++ b/templates/CRM/Contribute/Form/Contribution/Main.tpl
      @@ -491,10 +491,12 @@
      var total_amount_tmp = cj(this).data('raw-total');
      // Hide billing questions if this is free
      if (total_amount_tmp == 0)

      { - cj("#billing-payment-block").hide(); - }

      + cj("#billing-payment-block").hide();
      + cj(".payment_options-group").hide();
      + }
      else

      { - cj("#billing-payment-block").show(); + cj("#billing-payment-block").show(); + cj(".payment_options-group").show(); }

      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgg David Greenberg
                Reporter:
                eileen Eileen McNaughton
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: