Posted: February 13, 2020 at 2:27 pm
I found this thread
that indicates we can replace the ticket selector template by putting a file in the theme root. I have done this and I am able to see changes I am making.
My problem is, that the site sells tickets for classes that last up to 19 weeks. Each week we prorate the cost of the ticket down so new students can join in later weeks and they pay a little bit less. I have set up tickets with “joined” start and end dates so that the new ticket becomes available the moment the class is over. This works well – I hide the “Goes On Sale” lines with CSS ‘tickets-pending’ class.
However, the tickets available count (we call it “Seats Open”) is taking the “future tickets” into account!
Is there a way to count the spaces left without considering the “future” tickets QTY?
I had thought of managing this using a cron job that would just “delete” the old ticket and create the new one. But, if possible, I want to be able to create these tickets ahead of time and not have to manage them with a cron job.
Thanks in advance for any help / advice / insight!
Which ‘tickets available’ count are you referring to?
With mentioning the ticket selector template I’m assuming you mean the details in the ticket details section under access?
If you can include a screenshot that shows section I can look into this further.
I think I confused two templates here.
I have overridden the content-espresso_events.php template as well. That is where my issue is.
I am using code that looks like this:
and it is returning all the spaces available for all tickets regardless of whether they are currently available.
I suppose I just need guidance on which method in the Events class to use so that I can count only QTY in the “active/available” tickets.