Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.8
-
Fix Version/s: 4.1.0
-
Component/s: None
-
Labels:None
Description
The Context: I need to generate PDF receipts for Canadian tax deductions. I'm also using a donation form where the user can become a member and donate at the same time. To make the UI less confusing, we separate the donation amount from the membership amount.
The Problem: the module I'm using to generate the PDF receipt is using hook_civicrm_alterMailParams() to attach the PDF to the e-mail receipt sent by CiviCRM. However, when the user becomes a member+donates, the hook_alterMailParams() only gets the Contribution ID for the membership, not the donation.
Solution: when the contribution is processed, save the contrib ID in the $form->_values and send that to the alterMailParams. (see the attached patch, simpler to explain).
bgm