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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.2 Release Testing »
  • PDF Letter Contribution Tokens
Pages: [1]

Author Topic: PDF Letter Contribution Tokens  (Read 1752 times)

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
PDF Letter Contribution Tokens
June 16, 2012, 09:21:11 am
Great work Samuel on getting this functionality working!!!!!

One question/request: Can you add a token that will list all the contributions from the search in a list?

Currently the way it works is that if I do a letter with the following:

Code: [Select]
{contact.first_name} {contact.last_name} {contact.contact_id}

ID: {contribution.contribution_id}

receive date: {contribution.receive_date}

source: {contribution.contribution_source}

paid by: {contribution.payment_instrument}

total amt: {contribution.total_amount}

Then each contribution becomes a separate letter. I'd like to be able to do a letter like the following:

Code: [Select]
Dear {contact.first_name} {contact.last_name},

Thank you for your contributions for the past year. Below is a list of your contributions.

ID..........Date...............Paid by.................Source..............................Amount
100        1/1/12            Check 2020          Donations blah blah         200.00
232        2/2/12             Credit Card          Donation                          100.00
321        3/5/12             Cash                    Donation                          50.00


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
Re: PDF Letter Contribution Tokens
June 16, 2012, 04:52:48 pm
Related question:  Is there a token for the contribution type?
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Re: PDF Letter Contribution Tokens
June 16, 2012, 05:23:15 pm
Sarah,

I just checked the sandbox for 4.2 and don't see a Contribution Type token.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: PDF Letter Contribution Tokens
June 17, 2012, 08:06:24 pm

might not be too hard to add contribution type tokens. Check:

CRM/Utils/Token.php, function getContributionTokenDetails

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.2 Release Testing »
  • PDF Letter Contribution Tokens

This forum was archived on 2017-11-26.