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

CiviContribute - Store Label Associated with Contribution Amount and Fix Default Setting

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7, 2.0
    • Component/s: None
    • Labels:
      None

      Description

      This "improvement" has 3 aspects related to improving how we handle the contribution amount options for a Contribution Page.

      1. Default Amount for Contribution Pages:
      Currently this value is stored in civicrm_contribution_page.default_amount. However, this model breaks when a page includes multiple contribution amount options with the same amount value. Modify the schema, replacing default_amount with default_amount_id - which is an implicit FK to civicrm_custom_option.id of the default amount option record. This will ensure that we default the correct radio button when the Contribution Page is rendered even if there are two options w/ the same dollar amount.

      2. Include Selected Amount Option LABEL in Confirmation, Thank-you page and Receipt and Store/Display Label in Contribution Record
      Add selected amount Label to display on confirm, thankyou and receipt. One way to do this is to use each amount's custom_option_id as the VALUE in the contribution page amount radio buttons-instead of $amount. Then we can "resolve" the label and the amount on subsequent pages and receipt. When the contribution record is created, store the actual Option Label string (e.g. "Gold Supporter") in a new field in the contribution record (civicrm_contribution.amount_level). NOTE: We don't want to use/persist the custom_option.id in the contribution record as these option values will likely change over time. When a contribution record is viewed, render the amount_level (saved label) next to the amount.

      Total Amount: $50.00 - Friend of the Forest

      3. If there are no preset contribution amount options (i.e. only amount_other is used on a page) - then we should suppress the the radio button for "Other Amount" and dynamically change the field label on the text field from "Other Amount" to "Contribution Amount".

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: