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) »
  • Getting Participant Id in Thank You Page.
Pages: [1]

Author Topic: Getting Participant Id in Thank You Page.  (Read 2714 times)

haydo

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Getting Participant Id in Thank You Page.
April 20, 2010, 08:05:05 pm
Hi guys
Sent a good few hours trying to work this out and googled but no joy.

Is there a way to hook in somewhere to get the participant id in the Event thank you page?   I've done a smarty debug but it seems that variable is not available in the page.   Any hints?  Also I'm not sure if this is possible - changing the event information that is displayed in the email, is there a editable template for that?  We have customized the thank you page but want to show this on the email as well as the text we have defined in the email settings in Event Information.

Thanks in advance and sorry for all the questions :)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Getting Participant Id in Thank You Page.
April 20, 2010, 08:57:21 pm
Hmm - I thought it had been added but maybe only to the e-mail template.


Try adding it in CRM/Event/Form/Registration/ThankYou.php in the function

  public function buildQuickForm( ) 

You'll see other variables assigned like this

        $this->assign( 'receive_date', $this->_receiveDate );

I think you submit it as a patch through JIRA  once you figure it out. I think IDs should always be assigned & think they have slowly been added.

NB - was it you using PaymentExpress? I made a slight change to it for 3.1.4 (I think that's the version) so that on a failed credit transaction the user winds up at the 'confirm/cancel' page rather than back at the start. We don't get the duplicate participation records as much now but still get duplicate 'pending' contributions. I'm hoping the work Andrew has done will help us to improve that in 3.2
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

haydo

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Re: Getting Participant Id in Thank You Page.
April 21, 2010, 01:40:48 pm
Hi Eileen.

That was the first thing I tried but no success hence my post.  Any other ideas?

Yup it was me using the DPS module :).  Awesome that's great to know, thanks for all your hard work on that.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Getting Participant Id in Thank You Page.
April 21, 2010, 03:21:54 pm
so you tried editing the php file? (I thought from your previous post that you had edited the tpl file).

It definitely is a case of adding the assign in the right place
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

haydo

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Re: Getting Participant Id in Thank You Page.
April 21, 2010, 03:34:06 pm
Yup definitely tried adding it in that function in the PHP file.  I tried heaps of different combination's but no luck, in a bit of a rush at the moment so I've just added a session variable in registration php file as a temp solution to access it in Thank You.  I very well could just be overlooking something but I tried doing it the exact same as the other variables in that function eg $this->_totalAmount etc also tried defining it in the preProcess( ) function also.  The session variable will be fine for now. 

Any ideas on the email template?  I've found a lot referencing it in the forums and the solution is to edit a template that doesn't seem to exist anymore.  RecieptMessage.tpl I think is the name.

Thanks for your help Eileen.


Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Getting Participant Id in Thank You Page.
April 21, 2010, 03:36:12 pm
the e-mail template is now in the gui - you can find it under the administrative menu I think
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

haydo

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Re: Getting Participant Id in Thank You Page.
April 22, 2010, 06:03:00 pm
Ahh thank you.  Any idea on how to display a custom variable that it is showing up on the thank you template but not on the email?  Where can I assign it to the email for display?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Getting Participant Id in Thank You Page.
April 22, 2010, 06:05:58 pm
I managed to get a result with {$contribution.id} which is not a smarty format so I think there are non-smarty variables available.

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

haydo

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Re: Getting Participant Id in Thank You Page.
April 22, 2010, 06:20:22 pm
Didn't have any luck with that  :'(.  Don't have to add anything else do I?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Getting Participant Id in Thank You Page.
April 22, 2010, 07:28:24 pm
argh - should have copied & pasted

{$contributionID}{$membershipID}

I have patched the hell out our message templates (to make it load custom tokens from hooks and to use html templates for pdf receipts and allow e-mailing of the pdf receipts) but I don't think any of those have an impact on this
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

haydo

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Re: Getting Participant Id in Thank You Page.
April 25, 2010, 05:57:11 pm
Thanks very much Eileen :), will give that a try! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Getting Participant Id in Thank You Page.

This forum was archived on 2017-11-26.