Support

Home Forums Event Espresso Premium How to sort tickets in ESPRESSO_TICKET_SELECTOR shortcode

How to sort tickets in ESPRESSO_TICKET_SELECTOR shortcode

Posted: April 10, 2023 at 9:07 am

Viewing 7 reply threads


steve.west

April 10, 2023 at 9:07 am

Is there a way to control/sort the tickets when using the ESPRESSO_TICKET_SELECTOR shortcode?
The tickets are in the order created, which also means they are displayed in ascending order by ID. That’s fine. I’d like the Ticket Selector Shortcode on page to display the tickets in the same order. Is there any way to do that?
My ticket item IDs are: 3, 5, 6, 7, 8, 9.
But when displayed on a page they are displayed in a different order: 1, 7, 8, 9, 5, 6.


steve.west

April 10, 2023 at 9:09 am

Correction of IDs
My ticket item IDs are:
3, 5, 6, 7, 8, 9.
But when displayed on a page they are displayed in a different order:
3, 7, 8, 9, 5, 6.


steve.west

April 10, 2023 at 9:21 am

Changing to the Legacy Editor seemed to fix it. Weird.


Garth

  • Support Staff

April 10, 2023 at 10:51 am

Hi Steve, so are you using the legacy or new editor?


steve.west

April 10, 2023 at 11:10 am

I was using the new editor, but that’s when I encountered the sorting issue. Switching to the Legacy corrected the ticket sorting of the shortcode.
I’d rather use the new editor.


Tony

  • Support Staff

April 11, 2023 at 2:34 pm

Hi Steve,

Can I view the tickets? I’d like to setup an event with the same ticket setup

The Ticket ID, Sale Start Date and Ticket Name ALL play a part in the order with the advanced editor so I need to copy what you have to narrow this down some.

The default order should be by Ticket ID, unless you’ve manually set a custom order?


steve.west

April 11, 2023 at 5:16 pm

Tony,
Here’s my ticket setup:

https://monosnap.com/file/gaHHRLGxciOexKzZJDs3DgNvVw96NE

The first item is set to be required; no other custom order has been set.

By switching back and forth between Legacy and Advanced editors, the sort order is now correct in the shortcode output. I am unable to get it back to the errant ticket order I was experiencing before.

I found this out as a fluke while trying to track down a problem that was making the Assign Dates panel unusable for the Advanced editor. Switching to the Legacy editor fixed that and also inadvertently corrected the ticket sort order. The issue with the Assign Dates panel was due to a conflict with the Font Awesome plugin. Disabling that plugin caused the Assign Dates panel in the Advanced editor to work correctly. It was the button on that panel that switches from a minus sign icon to a ticket icon that wasn’t showing up, and therefore no Dates could be assigned. I’ve since switched to loading a Font Awesome script in the head manually (via Kadence Pro).

Anyway, hope this helps.


Tony

  • Support Staff

April 12, 2023 at 9:23 am

By switching back and forth between Legacy and Advanced editors, the sort order is now correct in the shortcode output. I am unable to get it back to the errant ticket order I was experiencing before.

Ok, so I’ve found a bug with the ticket ordering in the new editor.

In short, the editor will only display the tickets set in the custom order regardless of how you st the editor to display them.

So in your screenshot if you click ‘Show filters’

The ‘sort by’ dropdown will order organize and sort the tickets by whatever you have selected…. but does not update the order of the tickets themselves in the database. So when the ticket selector pulls the tickets it will use the order previously set even though the advanced editor shows a different order.

Looks like the call to update the order in in the advanced editor is being skipped and we’ll get that fixed.

So right now if you need a specific order for your tickets in the advanced editor, click show filters and then the ‘reorder tickets’ button:

https://monosnap.com/file/88UB5sQmeby02TXraZ8PW2rz5bbfQu

A modal will show allowing you to drag and drop each individual ticket into the order you want. When you click save you’ll see a popup showing ‘order updated’.

That will get your tickets showing correctly in whatever order your set in the Advanced editor.

Viewing 7 reply threads

The support post ‘How to sort tickets in ESPRESSO_TICKET_SELECTOR shortcode’ 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