Support

Home Forums Event Espresso Premium EE4 Ticket Selector Template Error – Simple Vs. Standard

EE4 Ticket Selector Template Error – Simple Vs. Standard

Posted: November 17, 2017 at 6:59 am


bld_espresso

November 17, 2017 at 6:59 am

Hello,
I’m currently working on some minor customization to the ticket selector template using an override in /wp-content/uploads/espresso/templates/ticket_selector.template.php per some instruction found elsewhere in the support forum. The override works great except in cases where an event has only one selectable ticket option.

In these cases, I receive several errors such as “Undefined variable: datetime_selector”, “Undefined variable: ticket_row_html”, etc.

It appears that the core system would switch to using the template found at /modules/ticket_selector/simple_ticket_selector.template.php instead of using the more advanced standard_ticket_selector.template.php

So my question would be, is it possible to override only the standard_ticket_selector template with my custom version. Or can I add an additional override for the simple_ticket_selector somehow?

Some additional details:

My custom ticket_selector.template.php is loaded through the following filter:

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 WP_CONTENT_DIR . '/uploads/espresso/templates/ticket_selector.template.php';
}

I am running Event Espresso 4.9.50.p on WordPress 4.8.2.

Let me know if you need any more information. Thanks!


bld_espresso

November 17, 2017 at 6:59 am

Hello,
I’m currently working on some minor customization to the ticket selector template using an override in /wp-content/uploads/espresso/templates/ticket_selector.template.php per some instruction found elsewhere in the support forum. The override works great except in cases where an event has only one selectable ticket option.

In these cases, I receive several errors such as “Undefined variable: datetime_selector”, “Undefined variable: ticket_row_html”, etc.

It appears that the core system would switch to using the template found at /modules/ticket_selector/simple_ticket_selector.template.php instead of using the more advanced standard_ticket_selector.template.php

So my question would be, is it possible to override only the standard_ticket_selector template with my custom version. Or can I add an additional override for the simple_ticket_selector somehow?

Some additional details:

My custom ticket_selector.template.php is loaded through the following filter:

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 WP_CONTENT_DIR . '/uploads/espresso/templates/ticket_selector.template.php';
}

Let me know if you need any more information. Thanks!


Josh

  • Support Staff

November 17, 2017 at 7:20 am

Hi there,

Currently it’s advised to use the filter hooks within the ticket selector template to make customizations. It is no longer recommended to override the entire template.


bld_espresso

November 17, 2017 at 7:37 am

Josh,
That makes sense. Problem solved.

Thanks for the help.

The support post ‘EE4 Ticket Selector Template Error – Simple Vs. Standard’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  bld_espresso 1 year, 9 months ago ago

Topic Tags

Tagged: 

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!