Support

Home Forums Event Espresso Premium Best way to filter ticket selector?

Best way to filter ticket selector?

Posted: April 21, 2019 at 3:47 pm

Viewing 1 reply thread


Steve

April 21, 2019 at 3:47 pm

Hi There,

In order to reduce complexity for our customers at next years event, we’re looking to provide a more “wizard” type approach for ticket selection (as we have male, female, couple tickets, plus int’l versions, plus bolt-ons – so probably 30 odd tickets in all!).

What is the current best way of allowing us to do this? We’re looking to, as an example, be able to route people to a ticket selector which only shows the “international” tickets, which is a subset of our overall.

We are imagining perhaps going a specific URL which does this, and we’d have a page which asks customers, and routes them to the relevant ticket selector. Alternatively, perhaps we could have some jquery on page – but this might be above my skillset (but I’m willing to try).

WE’re also trying to get the Aparna Price Modifier plugin up and running separately, but having issues with that not activating, before anyone proposes it 🙂

Any tips/thoughts welcome.


Tony

  • Support Staff

April 23, 2019 at 4:36 am

Hi Steve,

How do you identify the ‘international’ tickets?

There’s a filter available which you can use to remove a ticket:

FHEE__ticket_selector_chart_template__do_ticket_entire_row

That filters the entire row of the ticket selector table for each ticket so if you return false for that filter (or nothing using '') the entire row is removed. However, to know which tickets to remove from the page you’ll add additional queries to pull the details and compare, for example using the ticket name to check for an ‘international’ string and then removing the row if it contains that string.

Here is an example using that filter to hide tickets with specific ID’s:

https://gist.github.com/joshfeck/f286b4ea46ee7589a2c7f11cbf747da1

https://github.com/eventespresso/ee-code-snippet-library/blob/013be3ad7c3d6953c428319ba46eb0a2c53891da/templates/jf_ee_hide_show_tickets_based_on_id.php

So within your function you’d check $_REQUEST for the value you set on the query string, if its matches you then check if the ticket is a specific ‘type’ (How you do this depends on your setup) and then if you don’t want the ticket to show, return nothing, if you want to ti show, return the content that was passed.

You could do something very similar using jQuery where you pull the value from the query string and then remove the ticket rows that don’t match whatever you set in the query string, but as you mentioned your not comfortable with jQuery I’m assuming you are comfortable with PHP?

Viewing 1 reply thread

The support post ‘Best way to filter 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