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) »
  • PDF Receipt Address Template
Pages: [1]

Author Topic: PDF Receipt Address Template  (Read 2918 times)

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
PDF Receipt Address Template
January 02, 2012, 09:37:05 am
I am trying to add a mailing label to the top of my contribution receipts.  We are going to print the receipts and put them in an envelope with a window in it.  I need to be able to take an organization name or an individual name.  I tried this but it through a smarty error when I try to print a pdf receipt.  I placed it in the Contribution receipt online and offline. 

{contact.addressee}<br />
      {contact.street_address}<br />
      {contact.supplemental_address_1}<br />
      {contact.supplemental_address_2}<br />
    {contact.city}{, }{contact.state_province}{ }{contact.postal_code}

Is there an easier way?  Will this morph depending on an organization name or a contact name?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: PDF Receipt Address Template
January 02, 2012, 12:22:32 pm
I tried this out in my 4.1 beta sandbox and was able to spit out {contact.addressee} without any problems. I'm assuming you're using this flow:

Find Contributions -> Print or Email Contribution Receipts -> PDF Receipts

This flow uses the Online Contribution Receipt system message template (regardless of how the contribution was originally created afaik) - so I inserted the token in that message template.

Might wanna check for some other typo in your edited template - else paste the exact smarty error message here.
Protect your investment in CiviCRM by  becoming a Member!

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Re: PDF Receipt Address Template
January 02, 2012, 01:02:59 pm
If I just add {contact.addressee}{contact.street_address} it works fine once I add  {contact.city}{, }{contact.state_province}{ }{contact.postal_code} it throws this error.



Fatal error: Smarty error: [in string: {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture} {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture} {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
{if $recei in /home/wesley/public_html/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1093


zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Re: PDF Receipt Address Template
January 02, 2012, 01:06:23 pm
Found the problem taking out the { } and the {,} works just fine now.

Thanks!

ncoughlin

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Joomla 2.5
  • MySQL version: MySQL5
  • PHP version: 5.3.10
Re: PDF Receipt Address Template
July 12, 2012, 08:41:00 am
I am attempting to add this information to our PDF contribution receipts as well. I understand that I have to change the System Workflow template “Contributions - Receipt (on-line)." I tried placing your tokens (minus the {, } and { }) in between {if $receipt_text} and {$receipt_text}, but I got a 500 Server error. Would you be willing to share the code as you were able to make it work? I'm not sure where to insert the tokens!

Quote from: zesgar on January 02, 2012, 09:37:05 am
I am trying to add a mailing label to the top of my contribution receipts.  We are going to print the receipts and put them in an envelope with a window in it.  I need to be able to take an organization name or an individual name.  I tried this but it through a smarty error when I try to print a pdf receipt.  I placed it in the Contribution receipt online and offline. 

{contact.addressee}<br />
      {contact.street_address}<br />
      {contact.supplemental_address_1}<br />
      {contact.supplemental_address_2}<br />
    {contact.city}{, }{contact.state_province}{ }{contact.postal_code}

Is there an easier way?  Will this morph depending on an organization name or a contact name?

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Re: PDF Receipt Address Template
July 12, 2012, 09:49:46 am
I just updated to the latest version and now this functionality is not working.  I am currently trying to troubleshoot as well.  I can't generate any pdf's.

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 Receipt Address Template
July 12, 2012, 10:04:32 am

can u reproduce this on our demo server.

If so, please file an issue along with the steps to reproduce

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

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Re: PDF Receipt Address Template
July 12, 2012, 11:14:57 am
I tried it on the demo server and it works fine on my site it says Fatal error: Class 'JException' not found in /home/wesley/public_html/libraries/joomla/error/error.php on line 175

How do I go about troubleshooting this?  Should I try and update again?

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 Receipt Address Template
July 12, 2012, 02:23:21 pm

sorry, no idea on this. might want to try disabling other third party components/plugins and see if that fixes it? also might want to add an error message in libraries/joomla/error/error.php and see if u can get more info

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) »
  • PDF Receipt Address Template

This forum was archived on 2017-11-26.