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

CiviMember - Extend Online Contribution Page Configuration (Admin) for Self-Service Membership Signup and Renewal


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


      The use case objective is for an organization to be able to configure an Online Contribution page which allows users to "signup" for a membership, and/or make a contribution above and beyond the membership fee. A new Membership Settings screen for the Contribution Page allows organizations to configure the membership type(s) offered to the contact as well as several other display properties and behaviors.

      We'll also look at supporting a simple membership RENEWAL use case. Contribution page will be passed an additional membership ID parameter to trigger renewal cases. (TBD - does renewal only work for logged in user/contact?).

      1. Schema Additions
      1.1 MembershipBlock (civicrm_membership_block)
      This new class/ table stores settings and controls the display and behaviors of a membership signup/renewal block for a specific entity (for now, these will always be linked to a civicrm_contribution_page).

      entity_table - varchar(64) - (will be 'civicrm_contribution_page' for now)
      entity_id - int - Implicit FK to civicrm_contribution_page.id
      membership_types - varchar(255) Defines the membership types to be exposed by this membership block. Stores a delimited list of FK's to
      civicrm_membership_type.id. (If only one, then we render membership_type_id as a hidden field and "force" the value - e.g contact memberships are automatically assigned this membership type)
      membership_type_default - int. Optional FK to membership_type.id. Set's default for membership_type_id radio button element in the block.
      display_min_fee - tinyint - default 1. If true, we automatically display the minimum membership fee stored in membership_type.minimum_fee after each
      membership type option in the radio button elements, e.g. [ ] Gold Member - $500.00
      separate_payment - tinyint - default 1. Should membership payment transactions be processed separately from any additional contribution on this page.
      If true, when "contribution amount" is present in the page AND is greater than selected membership type minimum fee - then 2 separate payment transactions are recorded. One contribution transaction and subsequent record is processed for the membership fee - using membership_type.contribution_type_id for the contribution type. Second contribution transaction is processed for the remaining amount -
      using contrbution_page.contribution_type_id.
      new_title varchar(255) - Title to display at top of membership block for new member signup.
      new_text text - Text to display below title of membership block for new member signup.
      renewal_title varchar(255) - Title for member renewal.
      renewal_text - Text to display for member renewal.
      is_required - tinyint - default 0. Must the user select a membership type or is membership signup optional on this page. If false, we include a "No thank you." radio button option in the membership_type_id element of the membership block.
      is_active - tinyint - default 1. Is the membership block enabled (displayed) or disabled for the linked Contribution Page.

      2. Extensions to Administer >> Configure Online Contribution Page
      2.1 Configure Contribution Page (civicrm/admin/contribute?reset=1&action=update&id=N)
      If CiviMember component is enabled, add a new row to the table of configuration links - below the "Contribution Amounts" row. Link text = "Membership Settings". Explanatory text (cell) = "Configure membership sign-up and renewal options."

      2.2 Membership Settings Form
      2.2.1 New form (subPage) for creating/updating values in MembershipBlock instance linked to this ContributionPage. Form elements listed below (with associated class property in parenthesis). This form is similar to the top half of the existing Premiums subPage (admin/contribute?reset=1&action=update&id=1&subPage=Premium) :

      • "Membership Section Enabled" (is_active) - checkbox - "Is the Membership sign-up section enabled for this Online Contributions page."
      • "Title - New Memberships" (new_title)
      • "Introductory Message - New Memberships" (new_text)
      • "Title - Renewals" (renew_title)
      • "Introductory Message - Renewals" (renew_text)
      • "Membership Types" - Fieldset with a table containing a row with a checkbox for each membership_type record where visibility = 'Public' and is_active = 1. Rows also contain a radio button to set one of the rows as a default membership_type for the block. Rows automatically ordered by membership_type.weight. When form is saved, we populate membership_block.membership_types with all CHECKED types and save the selected default to membership_block.membership_type_default
      • "Require Membership Signup" (is_required) - checkbox - "If checked, user must select one of the displayed membership types."
      • "Display Minimum Membership Fee" (display_min_fee)
      • "Separate Membership Payment" (separate_payment) - checkbox - "Should the membership payment transaction be processed separately from any additional contribution on this page."

      2.2.2 Validation rules for the form are:
      At least one membership_type_id checkbox must be selected. No default selection is required. All other form fields are optional.

      2.3 Contribution Amounts (civicrm/admin/contribute?reset=1&action=update&id=N&subPage=Amount)
      In order to support the case where only Membership Signup is exposed on a Contribution Page - we need a flag to disable the Contribution Amounts block.

      2.3.1 Add amount_block_is_active TINYINT DEFAULT 1 to civicrm_contribution_page schema.

      2.3.2 Add form element to the admin Configure Amounts form (make this the first field in the form):

      • "Contribution Amounts Section Enabled" (amount_block_is_active) - checkbox - "Uncheck this box of you do not want users to select or enter contribution amounts on this page (e.g. for membership signup forms with fixed membership fees)."




            • Assignee:
              anil Anil Kokitkar
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: