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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Adding contribution type and soft credit to receipt template
Pages: [1]

Author Topic: Adding contribution type and soft credit to receipt template  (Read 1366 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Adding contribution type and soft credit to receipt template
June 14, 2011, 08:45:42 am
I would like to add contribution type as well as soft credit (name of the contact) to the receipt message templates here:

civicrm/admin/messageTemplates/add?action=update&id=7&reset=1

I don't see these as available tokens, but it's possible they are available as a smartyTag, but... what tags would I want to use as a tag to try and print these into the template?

Thanks
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Adding contribution type and soft credit to receipt template
June 14, 2011, 03:12:40 pm
My guess is that contribution_type is available as a smarty variable already, and that soft credit contact name is NOT. First step is to verify this (on a test site!!!) by enabling Debugging, add the {debug} tag at the top of message template (telling smarty to spit out all it's available variables), and then trigger a receipt. If contribution type is available as a smarty var, you can just add it where you want it:

Contribution Type: {$contribution_type}

For soft credit contact, I think you'll have to define a new token (token hook) via a module. There's some posts on the forums if I recall covering adding tokens to receipts. If you get stuck, jump on IRC.
Protect your investment in CiviCRM by  becoming a Member!

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Adding contribution type and soft credit to receipt template
June 14, 2011, 03:39:27 pm
Honor/memory might be the same situation as 'soft credit' too, I suppose?

Thanks for the debugging/testing tips.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Adding contribution type and soft credit to receipt template

This forum was archived on 2017-11-26.