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) »
  • contribution-specific tokens
Pages: [1]

Author Topic: contribution-specific tokens  (Read 783 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
contribution-specific tokens
April 14, 2012, 03:20:21 am
I would  like to create custom mail merge tokens for contribution data, to support the end-user using a template that is something like:

Dear {first_name},  Thank you for your generous contribution of {contrib_amount}  for our fund {contrib_type} that you sent on {contrib_date} 

What would be a good general approach to know which contribution in particular to get the data from? Each person may have many, many contribution records.

Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: contribution-specific tokens
April 14, 2012, 05:20:43 am
there lies the problem.
i've done some that retrieve the most recent contrib.
or you could do one that lists all contributions, year to date
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: contribution-specific tokens
April 14, 2012, 01:15:42 pm
Something very similar was just developed during the code sprint last week. I believe it's slated for 4.2.

Also, I wrote a custom token that generates a table of all contributions of a given type that haven't yet been thanked. I blogged about it here: http://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • contribution-specific tokens

This forum was archived on 2017-11-26.