Support

Home Forums Event Espresso Premium Customize Ticket Selector

Customize Ticket Selector

Posted: May 20, 2017 at 8:11 am


marco-ka

May 20, 2017 at 8:11 am

Hello! πŸ™‚

I would like to customize the html output of the ticket selector. I use this code snippet:


add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'my_custom_ticket_selector_template_location');

function my_custom_ticket_selector_template_location(){
    return get_stylesheet_directory() . '/ticket_selector_chart.template.php';
}

(as suggested by Josh in this Thread)

Like this, I can customize the general structure of the selector. But I cannot find a way to customize the output generated by variables like the $ticket_row_html variable.

Thanks for your help!


Tony

  • Support Staff

May 22, 2017 at 4:46 am

Hi there,

You can not edit the content of those rows, you would need to generate your own and use them in place of the above.

We do not provide support for these kinds of customizations, however if you let me know what it is your trying to change I can check if there is another method you can use?


marco-ka

May 24, 2017 at 3:34 pm

Hello Tony! πŸ™‚

I would like the layout of the ticket list to be something like this:


Tickets
-----------------------
Date           Quantity
22 July 2017     [0]
25 July 2017     [2]

[Book!]

It would be really cool if I could just pick the fields I need. Is there any kind of API I can use for that that I am not aware of?

Thanks a lot, Tony!


Josh

  • Support Staff

May 24, 2017 at 6:29 pm

Instead of overriding the entire template you can use the hooks within the template to customize the Ticket Selector. For example, to customize the output generated by $ticket_row_html variable, you can use the
FHEE__ticket_selector_chart_template__do_ticket_entire_row
filter hook.

Or another hook that’s available is
FHEE__ticket_selector_chart_template__do_ticket_inside_row.

The support post ‘Customize Ticket Selector’ 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.

Event Espresso