Home › Forums › Ticket Products › Event Tickets Plus › Displaying Ticket "Additional" info in the Attendee list
- This topic has 12 replies, 6 voices, and was last updated 7 years, 4 months ago by Mike.
-
AuthorPosts
-
November 13, 2016 at 6:04 pm #1191680MikeParticipant
I have created Ticket Fieldsets to collect various bits of information from every ticket sold, in particular the attendee’s first name, last name, email, and birthdate. I need to list the attendee first and last names (NOT the purchaser, as I could care less who bought the ticket) on the attendee list as searchable/sortable columns. The default display (requiring the event organizer to open the view details for EVERY ticket) is time consuming and ill suited for the task of checking people in.
1. Is there a way to just enable Advanced Post Manager for the Attendee view, so that we can INDIVIDUALLY adjust what columns are displayed on the Attendee view? I would add that this would only work IF we can also access the ticket fieldset columns as well.
2. Is there a way to manually edit the Attendee view to include ticket fieldset info as COLUMNS (not a link/drop down display), and also include them in the search function?
Thanks for your time!
November 14, 2016 at 3:09 pm #1192129CliffMemberHi again, Mike.
The attendees report’s columns comes from https://github.com/moderntribe/event-tickets/blob/4.3.2/src/Tribe/Attendees_Table.php#L70-L87
I’m not intimately familiar with Advanced Post Manager’s code base, but I don’t think it’s able to work like that — customized for the events/tickets screen, i.e. the Attendees Table. However, you could request this as a new feature (or maybe search to see if the idea was already posted by someone else) at our plugins’ UserVoice page.
This allows others who are interested in that feature to easily voice their support. We frequently review suggestions there to find out which ones are popular, then we implement as many of them as we can.
If you post it / find it, feel free to link to it from here in case anyone comes across this forum thread in the future.
===
Here’s a code snippet that, I believe, you might be able to use as a starting point to add your own customization of Attendee View columns:
/** * Add price to ticket in attendees report */ function ct_add_price ( $item ) { $product = wc_get_product ($item['product_id']); echo 'Price: $' . $product->price; } add_action( 'event_tickets_attendees_table_ticket_column', 'ct_add_price' );
Please let me know if you have any follow-up questions on this topic.
November 19, 2016 at 2:54 pm #1194990MikeParticipantIs there a way to make new columns added to the attendee list searchable via the included attendee search function?
November 29, 2016 at 10:25 am #1199274BrookParticipantHowdy Mike,
That’s a cool idea. I like the notion of making each meta field a separate column. We could probably just enable the WordPress Screen Options button on that page, to allow you to choose which columns you want displayed. It might be a bit complicated to implement, but it seems like a great idea to me and one I’d like to share with our devs.
You certainly could add any new columns to the search. To do this you will need to override this JavaScript by deregistering it and registering a copy of it that you put inside your child theme:
/the-events-calendar/vendor/tickets/src/resources/js/tickets-attendees.js
On about line 48 you will see where the search function begins. You will note that it lists the searchable columns in there. You can add your custom columns inside this in a fashion similar to the other ones.
Did that help?
Cheers!
– Brook
November 29, 2016 at 12:16 pm #1199327MikeParticipantThis is why I suggested the Advanced Post Manager plugin (created by Matt of Modern Tribe), which already provides this functionality for the Admin Events page. It apparently works for any custom post type, so I imagine it could be utilized for Attendee Views as well.
November 30, 2016 at 12:49 am #1199619BrookParticipantI can totally understand that. And yes it could be implemented for the attendees, though it would require a decent measure of modification for this since it’s not a classic post type.
But, in the interest of being forthright I think it will be a little too powerful for the average user. It offers so many options, which makes it a bit slow and daunting. Personally I think for most users having the Screen Options available would satisfy the usual needs, all without introducing a slow and decently complex UI. Not that my line of thinking has any more merit than yours, it’s just my two cents.
Thanks again for all of the ideas and feature requests you have shared over the years. It has proven to be very valuable feedback time and again.
– Brook
November 30, 2016 at 2:04 pm #1200008ChuckParticipantIf I were to edit the tickets-attendees.js file to change the Screen Options, where would I put the tickets-attendees.js file in my theme? I have created a /tribe-events/ folder in my theme already per the Themer’s Guide. Does it go in there somewhere? FYI, I’m using Events Calendar Pro and Event Tickets Plus.
November 30, 2016 at 2:26 pm #1200017ChuckParticipantAnother thing…
Now that I’m looking, I don’t see Screen Options for my Attendees View. Do the Screen Options go away when using Event Tickets Plus?
November 30, 2016 at 11:30 pm #1200151BrookParticipantHowdy Chuck,
Now that I’m looking, I don’t see Screen Options for my Attendees View. Do the Screen Options go away when using Event Tickets Plus?
Sorry if I was not clear above. The Screen Options do not go away when you run Event Tickets Plus, rather they are simply not present on this particular screen (they still exist everywhere else). This screen is not an ordinary Custom Post Type view, and so adding things like Screen Options or APM is likely going to be a bit complex.
If I were to edit the tickets-attendees.js file to change the Screen Options, where would I put the tickets-attendees.js file in my theme? I have created a /tribe-events/ folder in my theme already per the Themer’s Guide. Does it go in there somewhere?
You can actually put your replacement file anywhere you want. The best spot is probably inside your theme folder. From there you will need to run a little bit of PHP to tell WordPress where you placed it:
wp_register_script( Tribe__Tickets__Tickets_Handler::$attendees_slug, dirname( __FILE__ ) . '/path-to-your/js-file-here.js', array( 'jquery' ), Tribe__Tickets__Main::instance()->js_version() );
See the part where it says dirname( __FILE__ ) . ‘/path-to-your/js-file-here.js’ ? This is where you will put the path to your JavaScript file. The dirname( __FILE__ ) . part is the path to the current directory of whereever your PHP file is. So let’s say you insert this into your theme’s functions.php file, then anything you put inside the quotation marks will be relative to the theme’s folder. If you want to put it inside /tribe-events/ then you might replace /path-to-your/js-file-here.js with /tribe-events/tickets-attendees.js Doing this should override the path our plugin sets, and thus when the JavaScript file gets included it will be from the new overriden path you just set rather than the one in the Event Tickets folder.
Does that make sense?
Cheers!
– Brook
December 1, 2016 at 11:24 am #1200466ChuckParticipantPerfect! Where would I put this bit of PHP? In the functions.php file?
I would love to see the Screen Options implemented in a future release. Seeing the various columns in the Attendees view is essential to a clean check-in process. So put my vote in!
- This reply was modified 7 years, 5 months ago by Chuck. Reason: Added content
December 2, 2016 at 2:24 am #1200741BrookParticipantThat’s a great place for it.
If you need further help with this, would you mind opening a new topic? That way we don’t spam Mike’s inbox.
Thanks!
– Brook
December 24, 2016 at 8:35 am #1210263Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Displaying Ticket "Additional" info in the Attendee list’ is closed to new replies.