Home › Forums › Ticket Products › Event Tickets Plus › Attendee CSV Export missing phone and address details
- This topic has 8 replies, 5 voices, and was last updated 8 years, 10 months ago by
Shelby.
-
AuthorPosts
-
May 31, 2017 at 9:54 am #1291372
Chris
ParticipantI can’t seem to find where I can get ALL the attendees details in the export. It is talked about 3 years ago here – https://theeventscalendar.com/support/forums/topic/additional-columns-in-the-attendees-list-csv-export/ and here – https://theeventscalendar.com/support/forums/topic/attendees-export-csv-more-user-info-columns/ but you still don’t get BASIC stuff like address and phone number. Perhaps I am missing something and you can point me in the direction of setting it up. Thanks.
June 2, 2017 at 1:05 pm #1292581Shelby
ParticipantHi there Chris,
I’m happy to help out with this. π
I think you may find this free extension helpful forΒ your particular issue. If I’ve misunderstood, feel free to clarify, and we can work on your request together. π
Best,
Shelby π
June 5, 2017 at 10:48 pm #1293598Chris
ParticipantThanks for that Shelby but have already done that via the functions.php.
I am looking for the phone and address to be added to the CSV export.
June 6, 2017 at 1:12 pm #1293999Shelby
ParticipantHey Chris,
Thanks for clarifying!
Unfortunately, this kind of request isn’t a built in option, and would require some customization that we can’t provide on these forums. However, we do have some resources for guiding you in doing that here. If you need to find someone to help with the customizations, we also have some tips for finding help here.
Hope this helps!
Thanks,
Shelby π
June 8, 2017 at 7:53 pm #1295542Bruce
ParticipantHey Chris,
I ran into the same problem, but found a solution. Add the following to your themes functions.php and you can add the phone and address details to the CSV.
I found this hook in https://theeventscalendar.com/support/forums/topic/export-out-attendees-list/
/** * Adds extra columns to the attendee export data (CSV only). * * Filters via the tribe_events_tickets_attendees_csv_items hook; intended for use * with the initial 4.1 release of Event Tickets only. * * @param array $items * @return array */ function attendee_export_add_purchaser_email_name( $items ) { $count = 0; $order_id_col = 0; $idx = 0; foreach($items[0] as $col_name) { if (strtolower($col_name) == "order id") { $order_id_col = $idx; break; } $idx++; } foreach ( $items as &$attendee_record ) { // Add the header columns if ( 1 === ++$count ) { $attendee_record[] = 'Customer Phone'; $attendee_record[] = 'Address 1'; $attendee_record[] = 'Address 2'; $attendee_record[] = 'City/Town'; $attendee_record[] = 'State'; $attendee_record[] = 'Post Code'; } // Populate the new column in each subsequent row else { // Assumes that the order ID lives in the first column $order = wc_get_order( (int) $attendee_record[$order_id_col] ); $attendee_record[] = $order->billing_phone; if (strlen(trim($order->shipping_address_1)) > 0) { $attendee_record[] = $order->shipping_address_1; $attendee_record[] = $order->shipping_address_2; $attendee_record[] = $order->shipping_city; $attendee_record[] = $order->shipping_state; $attendee_record[] = $order->shipping_postcode; } else { $attendee_record[] = $order->billing_address_1; $attendee_record[] = $order->billing_address_2; $attendee_record[] = $order->billing_city; $attendee_record[] = $order->billing_state; $attendee_record[] = $order->billing_postcode; } } } return $items; } add_filter( 'tribe_events_tickets_attendees_csv_items', 'attendee_export_add_purchaser_email_name' );June 13, 2017 at 1:15 pm #1297463Barry
MemberThanks for sharing and highlighting that solution, Bruce!
June 15, 2017 at 11:39 pm #1298973Chris
ParticipantHi Bruce,
Thanks for that, just what we needed! Works perfectly.
All the best
ChrisJune 16, 2017 at 11:31 am #1299291Shelby
ParticipantHi Chris,
Glad to see this resolved! Please reach out in the future with any questions or concerns you have about our plugins! π
Best,
Shelby π
-
AuthorPosts
- The topic ‘Attendee CSV Export missing phone and address details’ is closed to new replies.
