Home › Forums › Calendar Products › Events Calendar PRO › Add new Column in Attendees list view
- This topic has 4 replies, 3 voices, and was last updated 10 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
January 26, 2015 at 9:37 am #937692
turboecart
ParticipantHi,
The site we use Events Calendar PRO on has a customized checkout that allows users to enter additional information, like a screen name for example.
We would like for this additional information to also be available as a column on the Attendees page, to allow for easier identification of the client and facilitate check-in.
I see in the plugin code that columns are defined in \lib\tickets\tribe-tickets-attendees.php, function get_columns(), but it doesn’t seem to be filterable, so that I can add a custom column through my functions.php for example.
The associate function column_default( $item, $column ) is filterable though, which means that if I can define a new column, I will be able to populate it via a hook.
My question is – is there a better way to create a new column, other than editing the plugin files directly?
Thank you.
January 26, 2015 at 1:22 pm #937793Josh
ParticipantHey,
Thanks for reaching out to us!
This is a great question! Our table for viewing the attendees list is an extension of the “WP_List_Table” class available within. With that, there are some WordPress specific filters that you can use to modify the columns that are displayed. Here is a great forum reply showing the specifics of that process https://theeventscalendar.com/support/forums/topic/wootickets-add-columns-to-attendees-list/#post-686133.
Let me know if this helps.
Thanks!
January 26, 2015 at 1:40 pm #937808turboecart
ParticipantThank you! I was suspecting that, but wasn’t quite sure how to go about it. Using the code on the link you provided, I was able to add the column and populate the value as needed. 🙂
There’s just one more thing now.
The Attendees page uses an in-page jquery search filter, where you can filter by ticket #, order# or security code. I would also now like to filter by this new column I added.
I was able to track the function that does all this in resources/tickets-attendees.js and modify to do what I need, to enable the filtering for values in this new column as well.
But again, I did this by modifying the plugin files. Is there a better way to override this function through my own js file or something?
Thank you.
January 28, 2015 at 11:47 am #938614Josh
ParticipantHey!
Thanks for following up with us!
Unfortunately I’m not sure there is a simple way to modify this filtering. However, to ensure that your changes don’t get overwritten, you could:
- copy your modified js file into your theme
- dequeue the plugin version of that file from loading
- enqueue the new file from within your theme.
This isn’t the most ideal solution but it would allow you to make the changes while also keeping the functionality on upgrade.
Let me know if this helps.
Thanks!
July 7, 2015 at 6:31 am #983695Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Add new Column in Attendees list view’ is closed to new replies.
