Support

Home Forums Event Espresso Premium Event – Tickets selector – Datetimes order problem

Event – Tickets selector – Datetimes order problem

Posted: September 13, 2017 at 10:23 am


JacquesMivi

September 13, 2017 at 10:23 am

Hello,

For some events, on front-end, On some tickets when I click on “Display more informations” I have a wrong order on my datetimes. How could I force to always have datetimes sort ASC.

Thanks a lot,


Tony

  • Support Staff

September 13, 2017 at 12:43 pm

Hi there,

I’m not sure which section you are referring to, can you post an example?


JacquesMivi

September 14, 2017 at 12:22 am

Here is an example from my dev, so I took a picture for you.

https://www.viviarto.com/image-1/
The last date should be with september’s dates


Josh

  • Support Staff

September 14, 2017 at 10:28 am

Hi Jacques,

The order of the datetimes is actually controlled by the end user. You click on the
icon and drag then drop the datetime rows into the order you want them to be displayed.


JacquesMivi

September 18, 2017 at 1:29 am

Hi Josh,

No way to automate it in front end ?
Because I have a form gravity in front to automatically create dates to the year. This would save me lor time to sort the display by date.

A toute,


Tony

  • Support Staff

September 18, 2017 at 2:50 am

You can likely replace the template that is being used but I don’t recognise the output from the screenshot.

Can you either link to the output so I can view it or provide more details on where that list is output, please.


JacquesMivi

September 18, 2017 at 3:01 am

For example : https://www.viviarto.com/cours-stages-artistiques/improvisation-theatrale-theatre-paris-cours-acte-2-cours-de-theatre-debutant-journee/

You can click on “Afficher details et horraires”. This is the list I want to always display by date order.

By the way how can I edit this template. I really want to change it by a calendar.


Tony

  • Support Staff

September 18, 2017 at 3:24 am

I see, its part of the ticket selector and is the ticket details, I don’t really recommend changing those templates as there is a lot of logic going on there howere it can be done.

Take a look within \modules\ticket_selector\templates\ticket_details.template.phpticket_details.template.php

Around line 130 you’ll find:

$datetimes = $ticket->datetimes_ordered( $event_is_expired, false );

That pulls the datetimes based on the order set within the admin. We don’t have a helper function for pulling datetimes on a ticket based on start time but you can create your own (or pull them directly using the models).

For example:

$datetimes = EEM_Datetime::instance()->get_datetimes_for_ticket_ordered_by_start_time( $ticket->ID(), false );

You can place the above template within your themes root directory and modify it there to replace the original.

The support post ‘Event – Tickets selector – Datetimes order problem’ 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