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 CiviEvent (Moderator: Yashodha Chaku) »
  • Including "Dear firstName LastName" on event reciept
Pages: [1]

Author Topic: Including "Dear firstName LastName" on event reciept  (Read 860 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
Including "Dear firstName LastName" on event reciept
October 22, 2009, 08:38:05 am
I am trying to modify the event registration receipt so that it starts out "Dear John Doe, "

I have started modifying the template file at  /components/com_civicrm/civicrm/templates/CRM/Event/Form/Registration/ReceiptMessage.tpl 

But how do I pull in the first and last name?   It is already part of the "To:" in the email message.

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

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: Including "Dear firstName LastName" on event reciept
October 22, 2009, 08:59:21 am

enable smartyDebug: http://wiki.civicrm.org/confluence/display/CRMDOC21/Debug+Tools

and see if we expose first/last name to the template (i dont think we do)

if you do need it, you can either get it from the display name, or implement a hook and expose it to the template

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

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: Including "Dear firstName LastName" on event reciept
October 22, 2009, 09:32:33 am
Is the template ReceiptMessage.tpl  also used for a web screen?  I am trying to figure out which URL to add the smarty parameter to, as I thought that template is only used for emails.




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

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: Including "Dear firstName LastName" on event reciept
October 22, 2009, 10:09:38 am

all the smarty variables that get exposed to the web also get exposed to the mail message. They share the same template instance

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 CiviEvent (Moderator: Yashodha Chaku) »
  • Including "Dear firstName LastName" on event reciept

This forum was archived on 2017-11-26.