Support

Home Forums Event Espresso Premium Attendee Export – Column Order

Attendee Export – Column Order

Posted: November 10, 2014 at 7:27 pm


mminten

November 10, 2014 at 7:27 pm

My client used the excel and csv attendee exports a lot and would like to change the order of the columns when it is exported. Basically they want the more important info like First, Last Name, payment status, email, phone, etc. in the first columns of the export and the other items like group, id, etc. at the end.

I am familiar with SQL, can you tell me what files need to be edited to change this and if there is a way to do so and not have to redo it when you guys put out updates?


mminten

November 10, 2014 at 7:39 pm

I am using EE Version 3.1.36.6.P and WP 4.0


Dean

November 11, 2014 at 5:15 am

Hi,

It’s not an SQL matter but a template matter.

The export files are handled via this file /wp-content/plugins/event-espresso/includes/functions/export.php

The functions in there control the order or display, particularly the espresso_export_stuff function.

That function is Pluggable, meaning you can copy the function to a site specific plugin or even the themes functions.php and modify it, the modified version will supercede the original.

Further reading:
http://codex.wordpress.org/Pluggable_Functions
https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


mminten

November 11, 2014 at 1:46 pm

So basically I can add the entire espresso_export_stuff code to the functions.php file and it should work. Great! I found it. Now. I can see where I can change the headers but the problem is how can I order the items under them. For example the first thing the client wants is Team Name, which comes from a custom question. Is there a way to add this and other custom question to the output first and then the standard info later. I would also need to change the order of the standard info.


Josh

  • Support Staff

November 12, 2014 at 12:41 pm

Hi there,

The standard info is echo’ed out starting on line 507 of the export.php file, so you should be re-order those to match your column headers. Then to move the custom questions to display before the standard info, you can move the move the code block that echo’s out the standard questions after the foreach loop that echo’s the custom questions. You will also need to switch the order in the header from the standard header, custom questions to custom questions, standard header.


mminten

November 12, 2014 at 5:46 pm

I got that but what I want is to list some of the custom questions first and in a specific order requested by the client. Is there any way to break up the custom questions or re-order them in the export?


Josh

  • Support Staff

November 12, 2014 at 6:05 pm

Possibly, if you re-write where it loops through the custom questions and split them out to echo before and after the standard questions.


mminten

November 12, 2014 at 6:26 pm

Where is the custom question loop?


Josh

  • Support Staff

November 12, 2014 at 6:58 pm

The loop that echos out the answers to the custom questions follows after where it echos out the standard questions/answers.

It may help to contract with a PHP developer and team up with them for this project in order to meet your client’s needs.

The support post ‘Attendee Export – Column Order’ 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