Posted: September 25, 2017 at 2:16 am
|
Hello, How can I have the list of tickets order by their first datetime ? Can I use this code ? $tickets = $event->tickets( array( array(), ‘default_where_conditions’ => ‘none’ ) ); Or should I pass by EEM_Datetime function ? Thanks a lot, |
September 26, 2017 at 10:46 am Hi there, Can you provide more details on what you mean by a tickets ‘first datetime’? |
|
|
Suppose we are the 27/09/17. I wish a code to have this list Ticket 1 – His first datetime is the 01/09/17 Event is the “Ticket_Order” is different. |
Hi Jacques, The ticket ordering feature built in to EE4 allows for drag and drop reordering of the tickets. It does not automatically order the tickets by related datetime(s). One thing to keep in mind is one ticket can be related to many datetimes, so if you’re going to customize this with custom code you may need to decide whether to grab the first related datetime or the last related datetime. |
|
|
Hello, As the ordering feature does not allow this, can I use a function to have this kind of list on my custom code ? And after that, its up to me to assign the corresponding TKT_Order for each ticket. |
We need more information on what you’re trying to do (not just the outcome you want from above) to be able to advise further. As Josh mentioned, tickets can be related to multiple datetimes so even if we provide an example of how to pull the datetimes for the ticket, it depends on how you tickets are setup, which datetime you want to pull and based on what? In other words there multiple variables at play and we don’t know enough to say which will be used. For example:
Why are you using Can you let us know what you’re actually trying to do ticket tickets/datetimes and how they are setup? |
|
The support post ‘EE4 – Tickets Order By firstdatetime’ 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.