Support

Home Forums Event Espresso Premium Export Total Tickets Sold in CSV

Export Total Tickets Sold in CSV

Posted: October 17, 2022 at 10:22 am

Viewing 5 reply threads


patrick@allairmedia.com

October 17, 2022 at 10:22 am

Hi,

I’ve been trying to find a way to export to total tickets sold for each person in the csv export for event registrations. So for example I have used this github link to display just the primary purchaser in the csv export https://gist.github.com/Pebblo/7177b8175241427913fb8fa426867e63
But I need to know how many tickets that person purchased.

Is there anyway to do this to display the primary purchaser and the total tickets for the csv export of an event?

Thanks!


Tony

  • Support Staff

October 17, 2022 at 2:16 pm

Hi there,

That snippet needed to be updated to use the newer filter within EE4 core (same functionality, just don’t a little differently) so I’ve updated it and included some additional code to include the group size in the CSV.

Note this isn’t really the ‘total tickets’ for the user… its group size… so if some registered twice for say 4 tickets at a time, it’s not going to show 8 on a single row but rather 2 rows of 4.


patrick@allairmedia.com

October 19, 2022 at 7:27 am

Hi thanks for updating the code but after replacing the old filter with that new filter it throws an error anytime I try to export a csv now. Here’s a screenshot link to the error https://i.snipboard.io/QrqTJ1.jpg


Tony

  • Support Staff

October 19, 2022 at 10:37 am

Hmm, that’s a front-facing error, to troubleshoot I need the ‘real’ error.

If you check the server’s error logs from around the time you run the export, does it show any errors from Event Espresso or the plugin holding that custom function at all?


patrick@allairmedia.com

October 19, 2022 at 2:28 pm

This reply has been marked as private.


Tony

  • Support Staff

October 19, 2022 at 2:38 pm

I’ve updated the snippet again with a simple change which should fix the above.

The function is expecting an array and I’m swapping it out for null, so now we return an empty array rather than null.

Please let me know if that fixes it for you.

Viewing 5 reply threads

The support post ‘Export Total Tickets Sold in CSV’ 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