Posted: July 31, 2019 at 10:00 am
|
I’ve recently purchased EE4 for my non-for-profit client who holds ‘food distribution events’ for those in need. When folks show up to a weekly food distribution, they are checked-in. We would love to sort by time checked-in so those who arrived first, can receive their food first. I see the data I need when I use the WP Admin panel and select Registrations / Event Check-In tab and Filter to correct event, correct event datetime – it is listed in the first column, Registrant: I want to put the Checked In data in a separate column and be able to sort by that column (that will put all Check In at the top with the earliest time first). Can you point me to the php file I can use and I could just edit the table code to add another column grabbing that data (and removing data from first column)? Thank you for your time. |
Hi, Actually you wouldn’t edit any core files to make this happen because you can add this using hooks. So instead you add the PHP code into your own plugin. Here’s an example of a code snippet you could add: https://gist.github.com/joshfeck/fc545da115fc3dce9829fce6772dfd22 The best place to put code like the above snippet is within a site specific plugin: |
|
|
Hi Josh – Thank you for the advice! I created the plugin, activated it and added your code snippet to the new plugin. That seemed to work, however; it doesn’t return any data other than the new column with it’s static title at the top. Is it a simple code error I am not seeing? The date/time is not returned and the column cannot be sorted yet. Can i sent you a screen shot of the admin view? Again, my client will be very happy when I can get this working. Thank you ๐ |
Hi, The column isn’t sortable, but it will re-order the rows based on check-in timestamps. When you look at the check in list for a specific event, have any of the registrations been checked in yet? If not, then no check-in timestamps will be displayed for those rows. |
|
|
Thanks for quick response! you must be ‘on work duty’ lol! Yes, half of the registrants have been checked in already for a sub event that took place 8/1. . . no data displaying in the column. So I did another test and created a new test registrant and checked them in to see if it would only show ‘new’ data. No luck. Data remains blank in that column. . . I can send you a screen shot or give you a temporary login if that would help. |
Does the check in timestamp display after refreshing the page? If the custom code is in place the check ins table should look something like this: https://slack-files.com/T02SY781D-FM7BGUL4X-f2610d6df2 If you’d like to send temporary admin access we can take a quick look to see if something is missing. You can send the info via the form on this secure page: |
|
|
Thank you. I sent the temp login credentials to wordpress admin and ftp account if you need to check my files on SiteGround. The new plugin is under plugins/checkin-time. I appreciate your help! |
I do see where timestamps are added (if you go to page 2 you should see theme). It does look like the code needs a few tweaks to accommodate this use case though, where one event has many datetimes, and each datetime has the same guest/check-in list. Usually different datetimes will have different registration lists. So it’s not evident for which datetime the user was checked in on. I can take another look at the code and see if there’s a way to attach in the related datetime ID so each datetime’s check-ins are kept track of there. |
|
|
That would be so kind if you can take one more look for me . . . if it helps, no one will EVER be checked into the sub-event until the sub-event date. If necessary, you can maybe ONLY display event checkin times that MATCH the same date as the sub-event. . . The reason we must have multiple sub events in each event is the attendees are homeless and ‘might’ come to all 10 events if possible, but they have no way to register themselves. So when they are registered for the first event by our staff, they can just be ‘checked in’ to future events on the event date to save everyone’s time. |
I made some revisions to the snippet, here: The part isn’t going to work well is sorting though. The reason being is the way the views are sorted, they’re sorted by the registration, not the check-in. They can be sorted only by a database field, in this case the field is Checkin.Timestamp. I do not see a way to sort conditionally only by the Timestamp database field if it’s a matching datetime. Maybe that’s something that someone else could work out, I don’t know. The limitation is mostly because it’s literally a list of registrations, not a list checkins. What you’d actually need for that type of sorting among multiple checkins over multiple datetimes would be a list of checkins per datetime. Besides building out a new admin page that displays lists of check-ins by each datetime (which is not currently a feature of Event Espresso 4) would be to instead have separate events each with one datetime. Instead of one event with many datetimes. One timesaver that could be used to populate each of the events with a registration list is the importer add-on. The importer add-on is going to be released sometime next week, but you can check out a copy from GitHub in the meantime: https://github.com/eventespresso/eea-importer You might find that the importer add-ons ends up being a better tool for the client if the client is doing all of the registrations anyway. |
|
|
OK my friend – you have been very helpful and hopefully my client will be satisfied ๐ I used the Importer Add-On and I think this will work great! I created a new ‘single’ event and imported all registrants, worked great. But then the view for a single event (not one with multiple sub-events) didn’t show the check-in column. So I reverted back to the ‘original’ set of code you provided for the Snippet in the custom plugin. View now shows in the single event… thank you |
The support post ‘Can I sort by Event Check-in Time’ 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.