Support

Home Forums Event Espresso Premium Edit template (specifically the quantity dropdown) of [ESPRESSO_TICKET_SELECTOR]

Edit template (specifically the quantity dropdown) of [ESPRESSO_TICKET_SELECTOR]

Posted: March 6, 2020 at 5:12 am

Viewing 8 reply threads


Wendy

March 6, 2020 at 5:12 am

I want to edit the quantity field of the [ESPRESSO_TICKET_SELECTOR] shortcode. In particular, I want to change the dropdown into a number input field, so I can style it with + and – buttons either side of it and have users be able to select the quantity of the ticket by either entering a number in the field, or clicking the +/- buttons.

Is there an easy way to do that?


Josh

  • Support Staff

March 6, 2020 at 12:01 pm

Hi,

There isn’t easily done but is possible with some significant custom PHP, HTML, and CSS development.

The contents of the rows in the ticket selector can be customized using a WordPress filter hook:
FHEE__ticket_selector_chart_template__do_ticket_entire_row

Here’s a link to its source:

https://github.com/eventespresso/event-espresso-core/blob/master/modules/ticket_selector/TicketSelectorRow.php#L349

The filter hooks allows a developer to potentially build out a callback function on that filter and output customized html (including some new number & + – inputs in place of the standard dropdown select input).


Wendy

March 6, 2020 at 1:03 pm

Ok thanks Josh. That’s more work than I’m willing to do for that small adjustment but appreciate the info anyway. You may want to consider updating the appearance of the ticket selector, especially the quantity selection, in the future as I think it’s somewhat outdated.


Wendy

March 6, 2020 at 1:05 pm

Or perhaps letting users choose from a few appearance options. Maybe it can be an add-on?


Josh

  • Support Staff

March 6, 2020 at 1:29 pm

Hi,

The appearance of the ticket selector is mostly controlled by the active WordPress theme. So if the ticket selector is looking outdated, that’s mostly because the theme isn’t applying styles to html tables, or the styles it does apply look outdated.


Wendy

March 6, 2020 at 1:39 pm

We’re just using a shortcode with the Astra theme so what’s being applied from the theme looks good. It’s really just the drop down style of the ticket quantity I’m referring to I guess because you can’t change that.


Josh

  • Support Staff

March 6, 2020 at 3:13 pm

The ticket quantity <select> input can be styled with CSS. For example, you could add the CSS from this gist into your site’s Additional CSS page/custom stylesheet:

https://gist.github.com/joshfeck/62075dfa368f3e428bfd877752a89f62


Wendy

March 6, 2020 at 3:31 pm

Awesome, thanks so much. Looks much better now!


Josh

  • Support Staff

March 6, 2020 at 4:15 pm

You’re most welcome.

Viewing 8 reply threads

The support post ‘Edit template (specifically the quantity dropdown) of [ESPRESSO_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