CiviCooP / org.civicoop.pdfapi

Create PDF files and send them to a specified e-mail address from the API
Other
0 stars 11 forks source link

Support contribution tokens #19

Open MegaphoneJon opened 5 years ago

MegaphoneJon commented 5 years ago

I have a use case that requires supporting contribution tokens on a PDF generated through CiviRules. I could put it in my "Fast Action PDF" extension, but I think it would be a good addition to this extension.

For instance, I once had a client ask if they could customize both the receipt email and PDF that went to donors based on the financial type. While it's technically possible to do this in Smarty, it would be very tedious and impossible for non-technical staff to edit. With CiviRules generating the PDF and email, it would be simple.

I'm working on this now and will probably wrap up tomorrow.

MegaphoneJon commented 5 years ago

I wrote a patch for this (it's my contribution-tokens branch) but realized my naive implementation repeated the mistake of mail#46. I rewrote the patch to take advantage of the fix to mail#46, which is merged to the RC now.

Since I know you support much older installations of Civi, I realize this might make this an unattractive patch to merge. Let me know how you feel about the work I've been doing, and how we should handle unforking - we could partly or completely unfork, depending on your feelings.