-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-16734 participant tokens in participant pdf #8260
CRM-16734 participant tokens in participant pdf #8260
Conversation
---------------------------------------- * CRM-16599: Add event tokens to participant pdf creation https://issues.civicrm.org/jira/browse/CRM-16599
fee_amount is a property of a participant, not of an event. ---------------------------------------- * CRM-16599: Add event tokens to participant pdf creation https://issues.civicrm.org/jira/browse/CRM-16599
Custom tokens defined with hook_civicrm_tokens and hook_civicrm_tokenValues were ignored. This commit fixes that problem. ---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
---------------------------------------- * CRM-15734: Dedupe contacts in group searches outside of group https://issues.civicrm.org/jira/browse/CRM-15734 ---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
I think this is needed since CiviCRM 4.7. ---------------------------------------- * CRM-15734: Dedupe contacts in group searches outside of group https://issues.civicrm.org/jira/browse/CRM-15734 ---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
|
||
switch ($token) { | ||
case 'balance': | ||
$info = CRM_Contribute_BAO_Contribution::getPaymentInfo($params['participant_id'], 'event'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no key participant_id
in the $params
array.
Thanks @johanv and @mallezie for all of this. This looks super-promising. Unfortunately, it has some buggy things that should be worked out. I'm happy to help with these, but I don't think this will be ready to go for 4.7.8. Some things to address:
Looking through this, I feel like this and other token use cases need test coverage. It doesn't appear that there's anything at the moment. |
One separate note: I don't think this has anything to do with this issue, but I was getting an error trying to generate a PDF at all because vendor/dompdf/dompdf/lib/html5lib/Parser.php requires vendor/dompdf/dompdf/lib/html5lib/TreeBuilder.php, but TreeBuilder.php is deleted in tools/scripts/composer/dompdf-cleanup.sh. Commenting out the line in Parser.php that requires TreeBuilder.php makes everything work just fine, however. |
@agh1 @xurizaemon - the |
---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
Let's just remove it. Probably a copy-paste error somewhere. ---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
I hope CiviCRM will use the preferred format of the user now. ---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
---------------------------------------- * CRM-16734: Add participant tokens to participant pdf action https://issues.civicrm.org/jira/browse/CRM-16734
@agh1 Can you check this again? |
While working on QA for this PR, I found some minor issues related to the above changes after the update-
|
…t_pdf Let's first get the most recent version.
I will look at @jitendrapurohit 's comments, probably next week, but i will do some cleanup in this code first. |
It would be great if you would do a rebase -i on this & squash some patches |
This PR is replaced by #9038. |
Continued @mallezie's work for CRM-16734 (participant tokens in PDF letters for participants). This pull request is a continuation of #8258, which provides event tokens for PDF letters to participants (CRM-16599). Now you can create PDF letters like this: