Main menu

Forum


× Help Forum English

Sorting of events with same date/time

  • widtmann
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago #13858 by widtmann
Sorting of events with same date/time was created by widtmann
Hello
I'm using iCagenda to present an event calendar including seat reservation for a theatre on a webpage. There is a special VIP lounge which can be booked for each event. Therefore I enter two events with the same time and date for each play. One entry for the standard seats and one to book the VIP lounge (just 1 double seat).
However, the order of the two entries does not seem to be consistent. It's definitively not depending on the name of the events (alphabetical).

How can I control the sorting of these two entries?

Best regards

Please Log in or Create an account to join the conversation.

 

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13860 by Lyr!C
Replied by Lyr!C on topic Sorting of events with same date/time
Hello,

The ordering will use date time of the event.

And if the same, it will be depending on the ID of each event.

Maybe an idea (didn't test it if it works...) is to add 1 second for the start datetime of the event to be after the other one, as second not display on frontend, but could be manually included in the datetime picker input.

But check too the id. Maybe best for an order in creating the event, for example, always first Standard, and second VIP (or the other order).

For information, many improvements are planned for the registration system and many to come in the next months. One of the feature i've planned is the possibility to have different ticket (seat) for one event (example : children, adults... or in your case: "VIP", "standard") each one with different settings, and possibilities to have paiement (in pro versions) for tickets with paypal.
So, many things in process (and to come in the next 3/6 months) to give better functionnalities and flexibilities to manage registrations tickets, and much more for the Pro versions ;-)

Best regards,
Cyril

Latest version : iCagenda 3.9.2
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

Please Log in or Create an account to join the conversation.

  • widtmann
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago #13864 by widtmann
Replied by widtmann on topic Sorting of events with same date/time
Hi Cyril,
I tried the trick with the start date/time but unfortunately it did not work. The seconds are being stored as you mentioned but it does not have an impact on the sort mechanism.
I double checked the IDs of the events and found that for all cases the IDs are already correct (standard event has a lower ID than VIP event with same date/time). However, there is one case (two entries with same time/date) where I still have a reverse order in the event list on the front page. When I go to the event list in the back-end and sort by date the order is correct. What else could have an impact on the sorting mechanism?

The new option with different tickets sounds promissing. Looking forward to the next release then.

Best regards,
René

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13890 by Lyr!C
Replied by Lyr!C on topic Sorting of events with same date/time

I tried the trick with the start date/time but unfortunately it did not work. The seconds are being stored as you mentioned but it does not have an impact on the sort mechanism.

I was wrong... in fact, i've already removed seconds before ordering is process... :side:

In fact, the idea would be to introduce new options as ordering... i add it in my todo list for when it will be possible ;-)

However, there is one case (two entries with same time/date) where I still have a reverse order in the event list on the front page.

Well, this is curious about this one, as id is the only database ordering proceeded in SQL request... Ordering on date is done before list display.

Do you have an online link to this list ?

Regards,
Cyril

Latest version : iCagenda 3.9.2
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

Please Log in or Create an account to join the conversation.

  • widtmann
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago - 7 years 2 months ago #13899 by widtmann
Replied by widtmann on topic Sorting of events with same date/time
Sure, the link to the event overview is here . You can compare the entries from Jan 20 where VIP comes first with then ones from Feb 25 where it is the over way around.
It's really weird I also took a look into the mysql database but could not find something obvious which might influence the order.

BR,
René
Last edit: 7 years 2 months ago by widtmann.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13925 by Lyr!C
Replied by Lyr!C on topic Sorting of events with same date/time
Hi!

I understand the ordering difference for ID ! ;-)
Well... not the human logic, but PHP logic...

16 is before 6 because "1" comes before "6" (does not take into account the full number...

That's why the difference... :pinch:

Will check if this is a "php" ordering or due to Joomla api's for sql request... B)

Latest version : iCagenda 3.9.2
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

Please Log in or Create an account to join the conversation.

  • widtmann
  • Topic Author
  • New Member
  • New Member
More
7 years 2 months ago #13937 by widtmann
Replied by widtmann on topic Sorting of events with same date/time
Oh I see, so it's probably doing a string compare instead of comparing the integer value of the IDs. That would mean the problem should disappear as soon as there are the same number of digits. For example IDs from 10 to 99 should be ordered correctly. If that is the case I could live with it. However, maybe in the future there is a better sort mechanism for entries with the same date and time.
Thank you anyway for your support!

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
7 years 2 months ago #13951 by Lyr!C
Replied by Lyr!C on topic Sorting of events with same date/time
Hello,

Yes this is the reason, but i will see to fix it for next release (it is in my list of todo things for next 3.6.7) ;-)
And to have a real ID ordering.

Regards,
Cyril

Latest version : iCagenda 3.9.2
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File Attachment:

The following user(s) said Thank You: widtmann

Please Log in or Create an account to join the conversation.

Moderators: Lyr!C
Time to create page: 0.173 seconds

 

Follow Us

acymailing logo new

Create your Joomla templates with Template Creator CK