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) »
  • Sending ID of a registration as confirmation number
Pages: [1]

Author Topic: Sending ID of a registration as confirmation number  (Read 1186 times)

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Sending ID of a registration as confirmation number
October 18, 2010, 05:54:56 am
Hello,

  We're hoping to use civiEvent as a method of tracking gift certificates. So in registering for an event, the customer effectively purchases a gift certificate.

  The issue now is that we want to send the ID of the registration as the confirmation number TO the registrant, but I can't find a quick way to do that. I was trying to include the id in some curly braces, but that didn't work within the confirmation box.

  I've seen one or two solutions to embed the ID in the confirmation text of ALL events, but we'd like to only send the confirmation number (formatted nicely) from one event registration.

  Any ideas?

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Sending ID of a registration as confirmation number
October 21, 2010, 02:28:45 pm
You could us the patch from here to get the participant ID into the set of available tokens.

If you want to add that token to the email messages selectively you would have to create a module that would use a custom table to store the event id and a flag indicating whether or not to include the participant id. You would also need wrap the line added from the above patch in a conditional that returns an empty string if the flag in your custom db was set to false. As part of your module you would want to customize the tpl file for the event form to include a checkbox for the Include Participant ID in Confirmation Email flag and handle your custom field on form submission.

It would require some work, but I don't think it is impossible.
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: Sending ID of a registration as confirmation number
October 26, 2010, 10:06:05 am
Thanks, Q.

I had applied the patch, having found that thread before, but I was hoping there was a better way of implementing my need without adding a "if event_id = 57" type of clause. It feels a bit slap-dash, but I guess beggars can't be choosers. :)

thanks again.

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: Sending ID of a registration as confirmation number
November 02, 2010, 10:33:55 am
the plot thickens.

i'm able to add to the tplparams array the value participantID, but I can't show that in the message templates. It comes up blank. Is there another piece of the puzzle? I've enabled the tplParams to send the participantID, but I'm not seeing it on the other end.


r

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Sending ID of a registration as confirmation number

This forum was archived on 2017-11-26.