CRM-16599 Add event tokens to participant pdf creation

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.6.3
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:

      Description

      Event tokens could be handy to use in the participant pdf letter action

        Attachments

          Activity

          [CRM-16599] Add event tokens to participant pdf creation
          Coleman Watts added a comment -

          Sounds good. Can you rollup a PR for this?

          Tim Mallezie added a comment -

          I'll start work on this next week, i needed to do some non-civicrm work the last few weeks.

          Tim Mallezie added a comment -
          Sudha Bisht added a comment -

          Thanks for Changes . But still there are bugs.
          Step to replicate:
          1. Find Participant -> try to Create PDF from any sample "Rain-forest Cup Youth Soccer Tournament"
          Result: Throws Error.
          Note: https://github.com/civicrm/civicrm-core/pull/6092/files#diff-94f4c11d40ddc2b358d1f5068d47fc34R1731 doesnot contain participant id.

          2. Please define value for $contactId. As it is used at PDFLetterCommon.php Line no 71 and 73. So its display "Notice: Undefined variable: contactId". Due to which contact related token display nothing. For Ex.

          {contact.display_name}

          .

          3. If fee_amount is amount paid per participant (fee_amount in participant DB table). Its display incorrect amount as in db for that selected participant is 800. PDF show $1.00.
          Note: For retrieving fee amount, event related price set coding is done.

          ---------------------------
          Note: While replaceEntityTokens, if $event hold participant info then it would be simple to retrieve token value for participant.

          David Greenberg added a comment -

          Hi Tim Mallezie - Based on last comment from Sudha (Aug 5) - looks like there are still bugs in this PR. Are you planning on finishing up SOON? If not we'll need to push to a future release as we are heading toward 4.7 stable.

          Tim Mallezie added a comment -

          I'm sorry. I don't see any available time in the coming weeks. Best is indeed to push this probably.

          Johan Vervloet added a comment -

          I rebased Tim's pull request (#6092) for CRM-16599, and made it work for CiviCRM 4.7. I removed the event.fee_amount token, because fee_amount applies to participant, not to event.

          https://github.com/civicrm/civicrm-core/pull/8258

            People

            • Assignee:
              Tim Mallezie
              Reporter:
              Tim Mallezie

              Dates

              • Created:
                Updated: