Support

Home Forums Event Espresso Premium Send email with names of ALL "primary registrants" of a specific event to admins

Send email with names of ALL "primary registrants" of a specific event to admins

Posted: July 3, 2018 at 11:13 am


Markahn

July 3, 2018 at 11:13 am

Hi Espresso-team
We sell tickets to driving courses with different instructors. Is it possible to email a list of ALL the “primary registrants” of a specific event (course) to one or more of the instructors. In order for them to compare registrations with persons attending the courses. Thank you for your help!


Josh

  • Support Staff

July 3, 2018 at 11:18 am

Hi,

This can be done manually (do a CSV report, then attach to an email and email to the instructor). Currently Event Espresso 4 does not have an automated feature that can send out emails like this.


Markahn

July 3, 2018 at 12:23 pm

Thanks, Yosh, for your quick reply. I already considered that, but found the information in the CSV-file too confusing for our teachers. Is there a way to filter just the registrantant names and eventually phone numbers into the CSV-output?


Josh

  • Support Staff

July 3, 2018 at 2:07 pm

Yes the CSV report is filterable via the WordPress plugin API. You can use the example code from the code library:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/registration_report_limit_columns_shown.php

Since you mentioned including the phone number field, you can change the code where it has:
'radio'
change to:
'Phone[ATT_phone]'

You can add the above code snippet to a functions plugin, then activate the plugin.


Markahn

July 5, 2018 at 6:57 am

Hi Josh, thanks for your advice. As recommended I created a site specific plugin-code-snippet-libraryin, included the code you pointed to (add_filter( ‘FHEE__EE_Export__report_registrations__reg_csv_array’, ‘espresso_reg_report_filter_columns’, 10, 2)…;
), but after activating the plugin I always get an empty csv-file. Even with just the code I found on github. Any ideas?
(The export file we use is filtered in events check-in and doesn´t work either in registrations.)

By the way: we´d also need fields (columns) from the primary registrants meta (which we added as an extra questions group, e.g. Birthday (date), and also an empty column but with a header like “info” to be filled out later. (I´m more or less familiar with php and javascript/jQuery)


Josh

  • Support Staff

July 5, 2018 at 7:04 am

You can check your PHP error log which could point to an error in the code that got copied & pasted.

Since you now mention that you also need other fields, this other approach where you remove specific fields would be recommended:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/tw_registration_report_exclude_fields.php


Markahn

July 5, 2018 at 10:59 am

Hi Josh, thanks for quickly responding. The above mentioned site plugin throws the following error warning/exception – even though all the code seems to be correct.
PHP Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/wordpresss.de/drivecenterbasel.wordpresss.de/wp-includes/script-loader.php:1554) in /var/www/vhosts/wordpresss.de/drivecenterbasel.wordpresss.de/wp-includes/pluggable.php on line 1216\n’

Anyway I tried the other script you mentioned and it works fine so far, Thanks for your help!


Josh

  • Support Staff

July 5, 2018 at 11:08 am

The code within the site plugin does not cause the Headers already sent warning, however if there are any spaces, new lines, or other stuff before an opening <?php tag or after a closing ?> tag. You’ll find some troubleshooting steps here:

https://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F


Markahn

July 6, 2018 at 4:24 am

HI Josh – there´s a new issue concerning the CSV-Output: We n o w would like to include also the event times (e.g. 7:00 h – 17:00 h) and a custom field that we created with each event named instructors (containing the names of the courses instructors (instruktoren)). Both don´t exist in the original “filtered” CSV-output-file. How would you suggest to gon on (I have seen the following script https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/jf_ee_registration_report_add_checkin_and_checkout_timestamps.php – but I am not shure, either which variables to use nor how to order or use in connection with the other function $fields_to_exclude_from_csv = array(){}). Thank you very much for your support!


Josh

  • Support Staff

July 6, 2018 at 6:51 am

You can add the following to inside the function you already have:

$event_id = $reg_row[ 'Registration.EVT_ID' ];
// example of getting the post meta
$instruktoren = get_post_meta( $event_id, 'instruktoren', true );
if ( $instruktoren != '' ) {
    $reg_csv_array[ 'Instruktoren' ] = $instruktoren;
}

Then to add start and end time columns:
https://gist.github.com/joshfeck/a2b9ee9a2d131fcb3b63fa4fccd44da0


Markahn

July 6, 2018 at 8:01 am

Thanks, Josh, the above script worked after a little correction of the line: $intruktoren = get_post_meta( $event_id, ‘instruktoren’, true ); I had set up the custom meta field with a big starting “I” so the function worked with:
$intruktoren = get_post_meta( $event_id, ‘Instruktoren’, true );
Thanks!!!

The support post ‘Send email with names of ALL "primary registrants" of a specific event to admins’ 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