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 CiviContribute (Moderator: Donald Lobo) »
  • Include the contribution type in the system template: Pledges - Acknowledgement
Pages: [1]

Author Topic: Include the contribution type in the system template: Pledges - Acknowledgement  (Read 852 times)

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Include the contribution type in the system template: Pledges - Acknowledgement
August 27, 2010, 09:48:18 am
Is the contribution type (ID or name) exposed or some how available to be used in the Pledges - Acknowledgement template?

The contribution type is included in the contributions receipt (off line) system template, so I thought maybe adding the field id for contribution type  (<p>type:{$contribution_type_id}</p>) in the pledge - acknowledgement template might work.  It didn't....

If there is file that I'll need to modify, please provide the path :)

Thanks again!


dschafer

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 3
    • Backoffice Thinking
  • CiviCRM version: 3.2.3 - 4.4.4
  • CMS version: Drupal 6.x, 7.x, Wordpress
  • MySQL version: 5.1.x - 5.5.x
  • PHP version: 5.2.x - 5.4.x
Re: Include the contribution type in the system template: Pledges - Acknowledgement
August 27, 2010, 10:12:01 am
Hi,
It looks like the values that are assigned to the template in \CRM\Pledge\BAO\pledge.php sendAcknowledgment()

Is that true? Is contribution_name available?

Thanks

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: Include the contribution type in the system template: Pledges - Acknowledgement
August 27, 2010, 04:27:30 pm

1. u should enable debug

2. add the line

{debug}

to the template. u'll see a lot of js code etc, but will also see all the values that are sent to smarty. Will be good if someone can write a smarty function to debug the name/value pairs in a simple text format

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

dschafer

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 3
    • Backoffice Thinking
  • CiviCRM version: 3.2.3 - 4.4.4
  • CMS version: Drupal 6.x, 7.x, Wordpress
  • MySQL version: 5.1.x - 5.5.x
  • PHP version: 5.2.x - 5.4.x
Re: Include the contribution type in the system template: Pledges - Acknowledgement
August 30, 2010, 08:57:17 am
For anyone who tries to use this:

The {debug} output is actually the js to produce the popup window that you see for a normal page template.

This is suppressed in most environments (outlook, gmail, etc.)

So you have to view the message source and then create your own output file.

The text is all escaped so it takes a little work.

dschafer

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 3
    • Backoffice Thinking
  • CiviCRM version: 3.2.3 - 4.4.4
  • CMS version: Drupal 6.x, 7.x, Wordpress
  • MySQL version: 5.1.x - 5.5.x
  • PHP version: 5.2.x - 5.4.x
Re: Include the contribution type in the system template: Pledges - Acknowledgement
August 30, 2010, 09:03:41 am
lobo,
Are any form / page hooks executed during the message generation?

I've used these to push data into a template in the past.

Thanks.

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: Include the contribution type in the system template: Pledges - Acknowledgement
August 30, 2010, 09:51:57 am

messages are always sent via a form, so the form run hooks are available and can/should be used

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) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Include the contribution type in the system template: Pledges - Acknowledgement

This forum was archived on 2017-11-26.