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

Profile - Support for Contribution Data Elements (CiviContribute Online Contribution Pages)

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      Over the next few releases - we will be extending Profile functionality so it can support relevant 'mixes' of object properties - such as Contact-Individual + Contribution data. For 1.4 we take a step in that direction by allowing users to add Contribution object properties (core and custom fields) to a Profile when it is used as part of an Online Contribution page (e.g. profile is linked by uf_join to the CiviContribute module).

      1. Administer CiviCRM Profiles - Profile Fields
      1.1 Extend the new hierselect sequence for picking the class of object (as specified in CRM-690) to include Contributions as an option. So the options are 'select', 'Individuals', 'Households', 'Organizations', 'Contributions'.

      NOTE: We MAY want to add an 'entity' column to the uf_field schema. This would prevent namespace conflicts that might occur if we ever have duplicated field_name values (e.g. if two objects have a property with the same name). Check w/ Lobo on this.

      1.2 If user picks Contributions - next drop-down displays all available custom contribution fields and the following 'standard' contribution properties:
      Contribution Type
      Invoice
      Source

      1.3 User picks the field they want and this is saved. (For this first iteration, add a form rule that 'In Selector' can NOT be checked for Contribution fields.

      2. Online Contrib page - form rendering and processing
      2.1 Contribution fields included in a profile which is linked to an online contrib page (via uf_join) - should be rendered inline in the profile fieldset (same as 'contact' fields).
      2.2 Contribution field data from the profile(s) should be inserted with the contribution record insert. If contribution_type is specified, this over-rides the default contribution type established for that contribution_page. If Invoice is specified, this over-rides the automatically generated invoice_id. Same for Source. If custom contribution fields are defined in the profile, then custom_value record inserts are also done at the same time.

      3. Error Conditions
      If a profile includes contribution fields AND is invoked in any context OTHER than an online contrib page (e.g. civicrm/profile...) – display a warning status msg INSTEAD OF displaying the Profile. "The requested profile - $profile_title - includes one or more Contribution fields, and can only be used as part of an online contribution page."

      NOTES:

      • As you extend the profile code - keep in mind that in A FUTURE RELEASE we will want to support nested profile listings for Contact + Contributions. That is, if a uf_group includes contact fields and contribution fields - when we invoke the profile in listings mode - we would display a row for each contact followed by nested row(s) for THEIR contributions:

      Jalmi, Kurund 10 Main St. Mumbai
      Donation 100.00 Jan 11, 2006
      Donation 500.00 Dec 12, 2005

      • We will probably also want to support rendering and processing of contact+contribution field profiles in profile/create, User Registration, and User Account contexts in the future. In these cases, we would be either:
      • inserting contact + contribution + activity history records (profile/create, user registration)
        OR
      • inserting contribution+activity history for the contact linked to the logged in user

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: