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) »
  • Confirmation number?
Pages: 1 [2] 3

Author Topic: Confirmation number?  (Read 6745 times)

mcnamedia

  • Guest
Re: Confirmation number?
November 24, 2008, 08:53:38 am
Yes, while our event isn't yet live, we have tested it and it works quite well. I'll definitely follow up to get this as a feature. Great structure idea provided above as we have our confirmation number as CSF2009-10 where CSF is the name of the orgnaization and 10 is the $registerByID.

Add the line as Lobo said:

CRM/Event/Form/Registration.php, line 544

add the following:

$this->assign( 'registerByID', $participant->id );

Then go into your receipt template file and add

{ts}Confirmation number: CSF2009-{$registerByID}{/ts}

You can add the line wherever you want it to appear. I put mine right under Please print this confirmation... on line 15.


notyal

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Confirmation number?
March 03, 2010, 11:01:58 am
Sorry to bring such an old thread back to life, but I am looking to include a confirmation number and have a couple of questions. I am running CiviCRM 3.1.3 and was wondering if an easier solution was addressed with the new release. (The solution here seems easy enough, but as a non-programmer wanted to make sure before changing code around.) Also, is it possible to report out on this info with CiviReport if it were set up this way? It just needs to be a simple report with name, email, and conf. #.

For a little background, the events are actually webinars, and we would like to generate a random number at the time of registration, then upload those names and email addresses to the webinar software to use as usernames and passwords. Thanks in advance for any help.

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: Confirmation number?
March 03, 2010, 12:05:25 pm

1. Not yet

2. You'll need to modify the reports to add this confirmation number

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

notyal

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Confirmation number?
March 04, 2010, 08:01:37 am
Thanks Lobo. I made the change in the php but am having trouble finding the receipt message. I did a search and found other posts with the path:
templates/CRM/Event/Form/Registration/ReceiptMessage.tpl, but I've looked there and everywhere else I can think of and can't find it. Did this file change in the last release or am I doing something stupid? The next step will be to modify the report. I haven't even started with that yet, but any quick suggestions on how-to would be appreciated. Thanks again for the great software and support.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Confirmation number?
March 04, 2010, 08:23:01 am
All the receipt/confirmation messages have been moved into the database (as of v3.1) and are editable from the administrator UI : Administer >> Configure >> Message Templates >> System Workflow templates.

Check this doc to get started w/ report customization:
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+structure+and+customization
Protect your investment in CiviCRM by  becoming a Member!

notyal

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Confirmation number?
March 04, 2010, 11:23:16 am
You guys are the best. I had a little trouble at first until I realized that the php code required goes on line 716 in release 3.1.

kh28102000

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: Confirmation number?
September 03, 2010, 12:38:32 pm
Hi All,
  I have Joomla 1.5.20 & CiviCRM 3.2.2.
I notice that "$this->set( 'registerByID', $participant->id );" is already in CRM/Event/Form/Registration.php in this version.
I added "{ts}Confirmation number: CSF2009-{$registerByID}{/ts}" statement in either "Events - Registration Confirmation and Receipt (off-line)" or "Events - Registration Confirmation and Receipt (on-line)" message templates.
The result e-mail I received only shows "Confirmation number: CSF2009-". Am I doing anything wrong? Need some advice. Thanks.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Confirmation number?
September 03, 2010, 04:52:19 pm
Not 100% sure that variable is available to the message templates - hopefully it is. HOWEVER, the code you have above is definitely not correct. You should either put the $registerByID variable outside of the {ts} tags, or use the "reference" mechanism.

Code: [Select]
// instead of this
{ts}Confirmation number: CSF2009-{$registerByID}{/ts}

// try this (doesn't make sense to translate the prefix or punctuation so also move them out
{ts}Confirmation number{/ts}: CSF2009-{$registerByID}

// this is the correct way to include smarty vars in a {ts} string (altho above makes more sense to me for this situation
{ts 1=$registerByID}Confirmation number: CSF2009-%1{/ts}
Protect your investment in CiviCRM by  becoming a Member!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Confirmation number?
September 03, 2010, 07:21:28 pm
I have probably misunderstood but we have wanted to expose the 'Participant ID' on receipts are are using

Registration No. {$participantID}
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

kh28102000

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: Confirmation number?
September 04, 2010, 09:17:33 am
Thanks Dave & Peter,
What I want to do is: After participant registered, on the "Thank-you screen" and "In the confirmation email that participant received"
, show the participant ID as the confirmation number.

I found the statement "$this->set( 'registerByID', $participant->id );" on line 718 in the "function confirmPostProcess()".

I copied the statement to anywhere in the "function assignToTemplate( )" and modified the statement in both templates as Dave suggested. On the Thank-you Screen, I put "Your confirmation number is {$registerByID}" in the Thank-you screen--> Introductory text section. Neither email nor thank-you screen shows participant id

I guess I still have "$this->set( 'registerByID', $participant->id );" statement in the wrong place. Any suggestions?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Confirmation number?
September 04, 2010, 12:07:18 pm
For the 'confirmation email' I still don't understand why modifying the System Workflow Message for Event Reg Confirmation (on-line) and (off-line) doesn't give you what you want.

/civicrm/admin/messageTemplates&reset=1

Click on the System Message tab

Edit the  Event Reg Confirmation (on-line)

Find

Code: [Select]
<!-- BEGIN CONTENT -->
and add

Code: [Select]
<tr><td align="right">
<BR>Registration No. {$participantID}</td></tr>

and something similar for Text version
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

kh28102000

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: Confirmation number?
September 04, 2010, 03:22:24 pm
I copied

<tr><td align="right">
<BR>Registration No. {$participantID}</td></tr>

and pasted it right under

 <!-- BEGIN CONTENT -->

I got "Registration No." showing on the right hand side and on first line of the confirmation email I received. The {$participantID} was translated as blank.
May I know where I should place the code "$this->set( 'registerByID', $participant->id );" or I don't even need to place this code at all?
Thanks for the help.

kh28102000

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: Confirmation number?
September 04, 2010, 03:49:22 pm
Forgot to mention, The URL of my site is http://www.hcsxa.org

kh28102000

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: Confirmation number?
September 05, 2010, 05:38:42 pm
After more digging, I was able to pull data from contact table such as contact.contact_id (based on token documentation). But, I still unable to pull the data out of participant table such as participant.id, which is what I want. Also, after submittion, on the thank-you for registration screen, I was unable to pull anything neither data from contact table nor participant table.

Does anyone have more ideas? 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: Confirmation number?
September 05, 2010, 09:16:54 pm

can u change

$this->set

to

$this->assign

i'm pretty sure we expose participantID to the template in some form, and a quick glance at the code (and according to pete) seems to suggest that it should work

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 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Confirmation number?

This forum was archived on 2017-11-26.