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

Remove hard-coding of display fields from billingBlock.tpk

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6
    • Fix Version/s: 4.6
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      Developer Doc

      Description

      This change basically takes the logic out of which fields to show from smarty & hands it back to php where it can be manipulated by hooks. This is a small step change as part of making the payment processor code less hard-coded. A separate ticket will cover giving payment processors more control over allocating the fields

      The following need to be assigned to the tpl

      {$paymentTypeName} (assumes conversion of payment_type_id in the payment processor table to an option name)

      {$paymentFields} - array of the names of payment related fields (e.g 'credit_card', 'expiry_date') - to display

      {$billingDetailsFields} array of the names of billing related fields (e.g first_name, last_name to display)

      • the second 2 effectively define fieldsets & allow fields to be added or removed more easily - note that the actual field definition is in QF

      Parts
      1) change to billingblock.tpl - rather like
      https://github.com/eileenmcnaughton/civicrm-core/commit/e664cdb70a89efa73195929758d5cbb9056ac52e

      2) alter relevant functions to assign the tpl vars mentioned above

      3) convert payment_type_id to an option value (may have to do this first)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: