CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Creating new contribution tokens for thank-you notes
Pages: [1]

Author Topic: Creating new contribution tokens for thank-you notes  (Read 551 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Creating new contribution tokens for thank-you notes
October 10, 2012, 07:04:06 pm
I am attempting to create some new tokens for use when the the user is creating thank-you notes using the new feature in version 4.2.2 ( ie click "Contributions ... Find Contributions, then choose the action "Thank-you letters for contributions" )

I have been muddling around in the file "CRM/Utils/Token.php"  and  the function getContributionTokenDetails.    The variable $details[$dao->id]['contribution_type_id'] is correctly populated with the contribution type id, even before I changed anything.

I added the section:
Code: [Select]
$contribTypeId = $details[$dao->id]['contribution_type_id'];
        $contribTypes =   CRM_Contribute_PseudoConstant::contributionType($contribTypeId);
        $details[$dao->id]['contribution_type'];



 But so far, I cannot get the contribution type name to appear in the list of tokens for the user, or get the token to get populated in the thank-you letter.   Any ideas?
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Creating new contribution tokens for thank-you notes

This forum was archived on 2017-11-26.