Support

Home Forums Event Espresso Premium Accessing info on the Registration Details page

Accessing info on the Registration Details page

Posted: January 20, 2021 at 12:19 pm


Antenna Digital

January 20, 2021 at 12:19 pm

I’m using a bit of code to submit a Gravity Form entry when someone registers for an event anonymously…meaning not logged in, and they hit the thank you page.

We provide a button on the thank you page that takes them to the event’s complete info page, and it’s that button click that submits the Gravity Form.

During registration they enter their email, and that’s what I’m after. Along with the Name of the Event they registered for.

I’m trying to put that information in the Gravity Form fields so when they click the button we capture that info.

I know I can get it in EE’s registration list.
The challenge is that for logged in users they just see the button to click without having to complete a registration and that’s initially what the GF form entry was for, so they could count them since no actual event registration was taking place, it was just a perk of being a member.

They are now wanting to allow non-members or ‘Guests’ to pay a fee to get access to the external link and it makes sense to try to add those details in the same Gravity Form.

Hoping that makes sense.


Tony

  • Support Staff

January 21, 2021 at 6:43 am

Hi there,

May I ask, which thank you page are you referring to?

The EE thank you page shown at the end of a registration?

I’m wondering how logged in users are viewing the thank you page without running through a registration, just loading it up with no registrant details?


Antenna Digital

January 22, 2021 at 5:57 am

Hi Tony
It is indeed the EE thank you page shown at the end of registration.

This is a bit of an odd use case. It’s an Association type of website and their users need to go to a webinar to obtain the credits they need to remain certified.

The client asked to have a button on the event detail page where their members can complete their webinar registration on a 3rd party site.

Logged in users (members with a paid subscription) have access to the button on the event detail page so don’t have to buy a ticket or go thru checkout.

But a ‘guest’ or non-logged in user purchases a $90 Guest Ticket and goes through the checkout process, and once successful lands on the EE Thank You page where they see the summary of the purchase and have access to the Invoice/Receipt pdfs.

On that page I have added the same button logged in users see on the event detail page.

In both cases, when the visitor clicks the button I ajax submit a gravity form to record the ‘click’. This was initially just for logged in users….who don’t have to go thru the checkout process, so the gravity form gave the client a list of members that had clicked the 3rd party registration button since no EE registration took place.

Then the client decided to add the Guest access (for a fee) and would like to maintain the list of people that clicked the button. But on that Thank You page, I can’t see to access the details (First Name, Last Name, Email) that was collected during the Guests ticket purchase.


Tony

  • Support Staff

January 22, 2021 at 6:42 am

Ok so before I send you down the wrong track, are you using an EE hook to add the button on the thank you page?


Antenna Digital

January 22, 2021 at 1:50 pm

Yes, I’m using this hook

function ee_course_materials_section_thank_you_page( $registration ){
if ( $registration instanceof EE_Registration ) {
…………… more …………

and within that function…I use this if statement to determine if that specific event (a webinar in this case) has the ACF field external registration set to TRUE.

<? if( get_field(‘external_registration’, $registration->event()->ID()) && $registration->status_ID() === EEM_Registration::status_id_approved): ?>
-within this if statement I output the button, and also I would like to set up the Gravity Form with the Name/Email/etc the Guest Registrant entered while checking out.


Tony

  • Support Staff

January 23, 2021 at 2:17 pm

Hook into AHEE__thank_you_page_registration_details_template__after_registration_table_row?

(It doesn’t really matter what your hooking into, just curious as most of the hooks pass the EE_Transaction object, but you using an EE_Registration so just curious)

So, if you have an EE_Registration object you can pull all of the details you need from that. Quick example:

$attendee = $registration->attendee();
if( $attendee instanceof EE_Attendee ) {
    echo $attendee->full_name(); //or fname(); and lname();
    echo $attendee->email();
}

With our models, I highly recommend using something like Kint:

https://wordpress.org/plugins/kint-debugger/

Wrap the object in d(); and you’ll get a list of all of the available method on that object which makes it really easy to find what you need from there.

The support post ‘Accessing info on the Registration Details page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso