Posted: August 6, 2020 at 7:36 am
|
Hi I have looked through the forum and cant see to find a solution that works. But can’t see anything I read about getting each ticket by name but this seems excessive work and am not sure this relates to my needs. Thanks |
Hi there, The function you’ve added was created to displays all of the spaces available for a datetime but your title (and post) refers to tickets, so first lets clarify where that function outputs. It’s display ‘Total Spaces Remaining: XXX’ after each datetime date on the event, here: https://monosnap.com/file/U52m5Mgoyto26l5Hj8pZnPA7LsVoY2 Where are you looking to output the remaining spaces for tickets? |
|
|
Yes – sorry its not the function I needed. I am looking to show available tickets per ticket type ie. sold 6 of 35 for each hourly slot.Im happy to update the template but wanted some direction in how to show them, i can’t see any filters or hooks? |
Where are you looking to output the remaining spaces for tickets? I need to know where you are wanting to output the details to know if there is a template or hook you can use. |
|
|
Hi Tony Thanks |
Oh, I see. So you’re looking to include the remaining tickets within the ticket selector itself and that’s not easily done as the template isn’t filtered (intentionally as the ticket selectors has a lot of logic that could be easily broken). The closest we have currently is this: https://gist.github.com/joshfeck/0e2e59c39a36b76cc65a3b92f9543c79 Which requires the ‘Show Ticket Details?’ option to be set to Yes in Event Espresso -> Events -> Templates -> Ticket Selector Template Settings as it just uses jQuery to move the details from there into the main row.
Sure, if you have the ticket ID you can create an EE_Ticket object using our Model System and then get pretty much anything related to the ticket from that:
|
|
|
Great thanks Tony W |
Yes, the dropdown is the number of available tickets at that time. |
|
|
Hi Tony, thanks for your support so far. Im not sure what’s going on but the details are not loading in per ticket in the single page so js can not get the relevant details. I am using a custom single event template, however i am using your filter to pull in the normal ee4 structure. |
|
sorry to add to this it seems manually putting $ticket_selector_row_html .= “Only “.$remaining; does show the remaining tickets but not sure why the details are not. |
Have you set them to display in the ticket selector options? Event Espresso -> Events -> Templates (tab) -> Ticket Selector Template Settings
Sorry, I’m not sure I follow, show the remaining tickets where? That function is outputting the additional ticket details and is passed the remaining tickets into the method, it outputs the whole section rather than just the remaining tickets value.
Yeah, that’s appending the $remaining value onto the end of whatever is output on the row. Do you have any functions hooking into:
or
|
|
The support post ‘show remaining tickets per ticket type’ 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.