Support

Home Forums Event Espresso Premium CSV Exports Issues – No Event Name or Exporting All Registrations Reply To: CSV Exports Issues – No Event Name or Exporting All Registrations

Reply To: CSV Exports Issues – No Event Name or Exporting All Registrations

Author Replies
Tony # Posted on April 11, 2018 at 10:00 am

Hi there,

Have you recently changed the above code? Unless the forum has altered the content its currently invalid. This line:

__( 'Registration's share of the transaction total', 'event_espresso' ) . '[REG_final_price]',

The apostrophe ends the string so that would throw a syntax error. You need:

__( 'Registration\'s share of the transaction total', 'event_espresso' ) . '[REG_final_price]',

When you export registrations for a specific event EE does not include the Event Name by default, because all of the registrations are for a specific event so its just duplicate data.

However, it’s simple enough to add into the CSV using the function above, add this;

//If the event name is empty, pull the event from the DB using the Registration.EVT_ID value and set the event name
if( empty($filtered_csv_row[__( 'Event', 'event_espresso' )])) {
    $event = EEM_Event::instance()->get_one_by_ID($registration_db_row['Registration.EVT_ID']);
    $filtered_csv_row[__( 'Event', 'event_espresso' )] = $event instanceof EE_Event ? $event->name() : '';
}

Just above return $filtered_csv_row;

Do NOT follow this link or you will be banned from the site!