Seach Events Module not ordering as intended

  • Christoph
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 month ago #113975 by Christoph
Hello,

the Seach Events Module orders the items for Category and Location in the pull down menu alphabetically. That creates a problem since we customized the order of Categories and Location with purpose in the configuration screens.

Is there an easy fix to this?

Thank you,
Chris

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

More
7 years 1 month ago #113979 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Seach Events Module not ordering as intended
Hi Chris

We order categories and locations by name in the module because we think that sorting by name will help finding the correct item easier

If you want to have it ordered by ordering, you will need to make modification to the code. Look at the file modules\mod_eb_search\mod_eb_search.php, you will see the code (just change ->order() code to ordering and it should be fine

Tuan

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

  • Christoph
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 month ago #113980 by Christoph
Replied by Christoph on topic Seach Events Module not ordering as intended
Thank you Tuan, great support and fast response. I changed:
Code:
->order('name');

to
Code:
->order('ordering');

and now it orders as set the category backend screen :-)

Copied that from the eb category module ;-)

In case I need the sorting by name I would order items by name in the backend manually.

Regards,
Chris

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

Moderators: Tuan Pham Ngoc