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

Allow "admin-only" price set fields

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.2
    • Component/s: CiviEvent
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Provide a way to configure price set fields that are only available to the 'back-office' Register Participants for Events functionality (and are hidden by default on public facing Event Info and Event Registration pages).

      Review and adapt the patch provided from Kirk Markley - with any modifications needed to meet the specifications below, and conform to our coding practices.

      • Add visibility_id field to civicrm_price_field. This replaces the 'is_public_hidden' boolean implemented in the patch - it's consistent with how we apply Public or Admin visibility to option_value rows. This column is implicit FK to civicrm_option_group with name = 'visibility'. Default value for column = 1 ('Public').

      NOTE: This approach will allow admins to configure other visibility values and use them via hooks - including the 'visibility by role' functionality discussed on the forums.

      • Back-office event registration (CRM/Event/Form/Participant) exposes all price set fields (regardless of visiblity_id).
      • EventInfo price set field display AND front-end Event Registration (CRM/Event/Form/Registration ...) only displays price set fields with visibility_id = 1 (Public).
      • The new visibility setting should also be respected for back-end vs. front-end Contribution forms.

      — Original post from Kirk Markley
      Patch to hide certain price set fields from public event registration pages as outlined here:

      http://forum.civicrm.org/index.php/topic,10194.msg50275.html#msg50275

      and mentioned here:

      http://forum.civicrm.org/index.php/topic,11926.msg51205.html#msg51205

      CAVEATS:

      1. Requires the creation of a boolean field called is_public_hidden in the civicrm_price_field table.

      2. Changes were originally made against files that had already been customized and then back-ported to 'clean' files. Hasn't been tested exactly like this.

      3. Does NOT address display of fields in events INFO page, only event REGISTRATION page. (I had already suppressed the entire price set from display on INFO pages for design reasons.)

      4. I haven't even looked at contribution pages yet as my needs were specific to events.

        Attachments

          Activity

            People

            • Assignee:
              rajan Rajan P Mayekar
              Reporter:
              kmarkley Kirk Markley
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: