Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.3.6
-
Fix Version/s: 3.4.beta
-
Component/s: CiviContribute
-
Labels:None
Description
We have overridden /CRM/Core/BAO/MessageTemplates.php to allow us to manage our email templates from within Drupal, and pull them from there. This gives us great flexibility to be able to associate different email templates to different contribution pages and users from different location etc.
In /CRM/Contribute/BAO/ContributionPage.php, you build up an array of parameters to send to sendTemplate. These include contributionId, contributionType and contributionTypeName.
We needed to know the actual Contribution Page ID, so that we can load in the appropriate template. We could of course look it up by calling civicrm_contribution_get() but this would incur extra database hits etc. So, instead we modified /CRM/Contribute/BAO/ContributionPage.php so that the ID of the contribution page is also passed onto sendTemplate().
See attached patch.