Support

Home Forums Event Espresso Premium registration_page_wrapper

registration_page_wrapper

Posted: January 6, 2016 at 10:05 am


hojati

January 6, 2016 at 10:05 am

I want to override the registration_page_wrapper.template.php file. This is working fine by copying the file into the theme folder. But now i want to output the Event data and was wondering how i could access this data in this file.

My Goal is to display the Event Name / Description / Categories / Date / Venue could you please help me?


Josh

  • Support Staff

January 6, 2016 at 1:22 pm

Hi Hojati,

Normally the event object isn’t available to the checkout steps, but you can get that data from the transaction object. There’s some example code in the Event Espresso code snippet repository that shows how to get the featured image from the event to display it on the registration form step. You can use the same method to get other data from the event as well.

https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/jf_ee_display_event_featured_image_on_spco.php

If you follow the above code to the point where it sets the $event object, you can get more info like for example the event name:

$event_name = $event->get('EVT_name');

or the category name:

$category = $event->first_event_category();
if ( $category instanceof EE_Term ) {
$category_name = $category->name();


hojati

January 12, 2016 at 1:03 pm

This worked out fine. Thanks you a lot!


Josh

  • Support Staff

January 12, 2016 at 2:23 pm

You are welcome.

The support post ‘registration_page_wrapper’ 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