Home › Forums › Ticket Products › Event Tickets Plus › Add new field to Attendees Table
- This topic has 9 replies, 2 voices, and was last updated 10 years, 11 months ago by
George.
-
AuthorPosts
-
April 14, 2015 at 10:06 am #955485
Mason
ParticipantHi,
I’d like to add a new column to the attendees table for certificates after “check in”. Basically exactly same as Check-in but for issuing certificates for event participants. Then, when I click on “Issue Certificate” button it would change to “undo issue certificate”. Ideally, it has to be exported to the CSV file too.
Is this possible with EDD-Tickets?
Thanks.April 14, 2015 at 10:24 am #955489George
ParticipantHey Mason,
Making such a customization is indeed possible, but you’ll have to take the reins on implementing things how you see fit. You can customize the Attendees List table a few different ways – I go over some of them in-depth in this other forum post, which should hopefully spark a few ideas for you → https://theeventscalendar.com/support/forums/topic/add-attendee-telephone-number-to-attendee-list/
If you apply those principles effectively, and take some time researching anything with WordPress’ way of doing things that you’re not familiar with, you should be able to put something together here.
In addition to that forum thread and the code I shared there, one hugely-helpful thing is that the Attendees List – and indeed all admin-facing tables in The Events Calendar and its add-ons – are just extensions of WordPress’ built-in WP_List_Table class. So if you learn about that class and how it and its methods work, you should learn quite a bit about extending tables that are built off of it like the Attendees List → https://codex.wordpress.org/Class_Reference/WP_List_Table
I hope this helps!
Cheers,
GeorgeApril 14, 2015 at 11:25 am #955504Mason
ParticipantHey George,
Thanks for your input. I read the other forum but it doesn’t help that much since I want to add a new column to the table.
If I wanted to edit the plugins core php file to add this column which files will I have to modify?Cheers
MasonApril 15, 2015 at 10:25 am #955787George
ParticipantHi Mason,
The core plugin files where the attendees list is assembled is in /admin-views/tickets/attendees.php – you can see the table being constructed here and try adding columns or tweaking data as needed.
Be sure to make backups of any customizations here, as they will be over-written if you autoupdate the plugin and will need manual replacement.
Cheers!
April 15, 2015 at 11:38 am #955805Mason
ParticipantThank you George. I can’t find the directory you mentioned in /wp-content/plugins/eddtickets/admin-views/
There is no sub-directory there!April 17, 2015 at 8:31 am #956287George
ParticipantHey Mason,
Hm, that’s a bit of a red flag, and I wonder what version of the plugin you’re using? The plugin indeed has /admin-views, though the only file there is a metabox.php file.
The /admin-views subdirectory I was referring to is actually in /the-events-calendar itself, the core plugin – not the files of a ticketing add-on, sorry for not being clear about that!
Let me know if you’re able to find this subdirectory in the core plugin.
Cheers!
GeorgeApril 17, 2015 at 10:26 am #956343Mason
ParticipantHey George,
I do have /admin-views/ but there is no sub-directory inside it!
I found the Attendees’ table defined in class-eddtickets.php located inside /classes/
Is this the only file that I should edit?
Thanks
April 21, 2015 at 8:38 pm #957217George
ParticipantHey Mason,
The only file you should need is /admin-views/tickets/attendees.php which is in the core version of The Events Calendar, not in the EDD-Tickets add-on.
Does that specification help at all? The template file here is not in the add-on – the add-on loads the template from the core plugin, The Events Calendar.
Let me know if this helps – and thank you for your patience thus far Mason!
April 28, 2015 at 11:41 am #959071Mason
ParticipantThanks George. Found the file 🙂
April 30, 2015 at 6:38 am #959589George
ParticipantNice! Since the rest of this process is a customization from here on out, I’ll go ahead and close up this ticket. If other issues arise on your site, or any other questions pop into your mind, let us know – come back and open up a new thread any time.
Cheers,
George -
AuthorPosts
- The topic ‘Add new field to Attendees Table’ is closed to new replies.
