Posted: July 29, 2021 at 9:07 am
I’m working on some event table customization in order to provide students with more information at a glance and want to add the status of the event in the table. I found this thread, and it worked well for customizing the link for cancelled and postponed events. https://eventespresso.com/topic/events-not-showing-canceled-or-rescheduled/ I’d like to know if there is a way to distinguish between upcoming events where ticket sales have started (are open) and where ticket sales have not started yet as well as events that are full with a wait list and events where even the wait list is full. The thought is that I’d like to have the registration link indicate ‘Register’ for events where registration is open, and ‘More Info’ for events where ticket sales haven’t started yet as well as Class Full (for totally full events) and ‘Waitlist’ for events that are full but the waitlist is still available. Thanks in advance for your attention. – Frank |
|
Hi Frank, That’s a little tricky, it is possible do although you’ll be increasing the queries a fair bit on the page.
The EE_Event class has a tickets_on_sale() method which will return true if you currently have tickets on sale (based on dates), otherwise false.
Full events will have a status of sold out, so you can check with
Note the above is untested but should help point you in the right direction for what you are trying to do. |
|
Thank you for the input Tony. Will try to work this out. Another question along the same lines. Is it possible to remove the last column (registration) and make the Event name (or row) the clickable link/URL to the event? Thanks in advance for your input. -Frank |
|
Yes, the add-on allows you to load your over version of the template used from within your theme (preferably a child theme) So copy the default template To remove the register column you remove line 50:
and line 132 (131 after your’ve removed line 50):
Line 112 will have:
Swap the contents of the td to be the link to the event, something like:
Then when you call the event table shortocde it will use that template. If you want to only do that on specific shortcode calls use a custom template name and then pass it to the shortcode, like so:
(The above would work if the copy of the template you placed in your child theme was named |
|
The support post ‘Display the status of events in table view’ 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.