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) »
  • Event registration email customization to include participant_id
Pages: [1]

Author Topic: Event registration email customization to include participant_id  (Read 5755 times)

pjindent

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
Event registration email customization to include participant_id
July 20, 2010, 10:04:47 pm
We would like to add participant_id to the event registration confirmation email. 

is there an easy php code or tag that can be put in the "Confirmation email" text area of:  /civicrm/event/manage?reset=1&action=update&id=8&subPage=Registration

OR

is there code that can be put in the email template to print the participant_ids for each person that has registered.  The email template I was looking at was:  /civicrm/admin/messageTemplates?action=update&id=19&reset=1

The reason for adding participant_id in the event receipt is so it can be checked at the event against Attendee List report. 

Rahul Bile

  • I post occasionally
  • **
  • Posts: 112
  • Karma: 16
  • impossible says, I M Possible
    • I AM POSSIBLE
Re: Event registration email customization to include participant_id
July 20, 2010, 10:21:47 pm
pjindent  ,

You can try applying below patch.

Code: [Select]
Index: CRM/Event/BAO/Event.php
===================================================================
--- CRM/Event/BAO/Event.php (revision 28783)
+++ CRM/Event/BAO/Event.php (working copy)
@@ -1051,7 +1051,7 @@
                 if ( $lineItem = CRM_Utils_Array::value( 'lineItem', $values ) ) {
                     $sendTemplateParams['tplParams']['lineItem']   = $lineItem;
                 }
+                $sendTemplateParams['tplParams']['participantID']  = $participantId;
                 require_once 'CRM/Core/BAO/MessageTemplates.php';
                 if ( $returnMessageText ) {
                     list ($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplates::sendTemplate($sendTemplateParams);

and then use the the $participantID in your message templates as :
 " Your Participant ID is {$participantID}  "

Hope this helps.

Rahul
« Last Edit: July 20, 2010, 10:30:33 pm by rahulbile »
Consider donating to CiviCRM if you use it. http://civicrm.org/donate

pjindent

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
Re: Event registration email customization to include participant_id
July 21, 2010, 05:15:30 am
Thanks Rahul, I appreciate your help.  I will give it a try.

Want to add another twist to this ... if an event registration record has multiple participants, I would like to print all the participantID in the email.  Options:
- I could do it at the top of the message.  Example: Your participation id = 42,43,44
- Print it next to last name. Example Last name: Jones (42)

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Event registration email customization to include participant_id
July 21, 2010, 05:33:14 am
pjindent :
CiviCRM provides support for changing the email templates that are sent by system (System Workflow Messages) through message templates.

To tweak the message to add participants IDs, you might wanna have a look at Administer →  Configure →  Message Templates and edit Events - Registration Confirmation and Receipt (on-line) { http://drupal.demo.civicrm.org/civicrm/admin/messageTemplates?action=update&id=19&reset=1 }

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

pjindent

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
Re: Event registration email customization to include participant_id
July 21, 2010, 07:36:03 am
Thanks for your note.  I need some help with accessing the participantID variable.  In the template, please suggest how to print participantID next to the last name (or a new row under the name).


Quote from: Yashodha Chaku on July 21, 2010, 05:33:14 am
pjindent :
CiviCRM provides support for changing the email templates that are sent by system (System Workflow Messages) through message templates.

To tweak the message to add participants IDs, you might wanna have a look at Administer →  Configure →  Message Templates and edit Events - Registration Confirmation and Receipt (on-line) { http://drupal.demo.civicrm.org/civicrm/admin/messageTemplates?action=update&id=19&reset=1 }

HTH
-Yashodha

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: Event registration email customization to include participant_id
September 21, 2010, 10:53:11 am
Hello,

 I tried using the suggestion to add the {participantID} code to the outgoing message, but the message sent only has that code exactly, not the value of participantID.

 Is there another change that needs to be made to use the variables in this way?

~r

glitchies

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Event registration email customization to include participant_id
May 20, 2011, 07:49:50 pm
Not sure if reviving an old topic like this is a good idea, but I am having this problem as well.  I am using CiviCRM v4 on joomla v1.6.  I have applied the patch ( i think i have done it right for the version of CRM I am running.) but I still just receive  "Your Participant ID is {$participantId}" in my confirmation screen.

jcm55

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 14
Re: Event registration email customization to include participant_id
March 08, 2012, 09:19:44 am
I've opened CRM-9829 to try to get pjindent's patch into core.

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: Event registration email customization to include participant_id
March 08, 2012, 10:31:20 am

done, part of 4.2

In future, attaching the patch to the issue would be even better!

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) »
  • Event registration email customization to include participant_id

This forum was archived on 2017-11-26.