test
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • Saguaros Moderator
    #1078720

    Hi,

    You’re right, it’s showing with alphabet order now. Could you share the credentials of your site and tell me the fields you’re wanting to change order? I will share with the team for further consideration.

    ae.sakon Friend
    #1078813
    This reply has been marked as private.
    Saguaros Moderator
    #1079079

    Hi,

    This kind of sorting is not available yet, I will share the dev crew for further consideration.

    Regards

    ae.sakon Friend
    #1079132

    Hi,
    This function is urgently! so if you have the solution or path to change the codes, please share it to me.

    Thank you.

    ae.sakon Friend
    #1079357

    Please feedback to me.

    Saguaros Moderator
    #1079400

    Hi,

    This feature is not available now and it requires some hard work to get it done, not with some lines of code. I’ve reported to the dev crew so pls wait for the update news.

    Thank you!

    ae.sakon Friend
    #1079538

    Hi,
    I will count the days and waiting for this function.

    Cheers!

    Saguaros Moderator
    #1079643

    Hi,

    I updated temporarily solution into your site via the file: components/com_jamegafilter/assets/js/megafilter.js

    Replace this code:

    return fgroup.getItem(a).options.frontend_value.localeCompare(fgroup.getItem(b).options.frontend_value) * order;

    By this:

    if (a.indexOf('attrct5') > -1) {
           return -a.localeCompare(b)
          } else {
           return fgroup.getItem(a).options.frontend_value.localeCompare(fgroup.getItem(b).options.frontend_value) * order;
          }

    The extra fields will show with order as screenshot


    1. 2017-12-07_093035
    ae.sakon Friend
    #1086870

    Oh my goshhh! amazing news in the new year!

    Thank you so much for all of you.

    ae.sakon Friend
    #1086876

    From above picture, I have more question. If I want to sort them like this

    1.kindergarten
    2.elementary school
    3.intermediate school
    4.junior high school
    5.senior high school
    6.student
    7.teacher-instructor
    8.individual
    9.family

    what should I do?
    Thank you.

    Saguaros Moderator
    #1086951

    Hi,

    Do you mean that sorting in backend settings of the filter? or on frontend? could you share the URL of that page also? as I’m not familiar with your native language.

    Regards

    ae.sakon Friend
    #1086963

    Hi,

    From your picture, the extra fields will show with order as this screenshot.
    enter image description here

    The result of your setting is…
    9.family
    8.individual
    7.teacher-instructor
    6.student
    5.senior high school
    4.junior high school
    3.intermediate school
    2.elementary school
    1.kindergarten

    but I want to show them in the reverse direction.
    1.kindergarten
    2.elementary school
    3.intermediate school
    4.junior high school
    5.senior high school
    6.student
    7.teacher-instructor
    8.individual
    9.family

    I had tried to change the positions of extra fields in the reverse direction from back-end.
    enter image description here

    But on the front-end still showing like this…
    9.family
    8.individual
    7.teacher-instructor
    6.student
    5.senior high school
    4.junior high school
    3.intermediate school
    2.elementary school
    1.kindergarten

    This picture is the result that I expected
    enter image description here

    You can see them on url: http://122.155.197.219/event/education/nsm-science-culture-camps.html#sort=attr.ct5.frontend_value

    Thank you.

    Saguaros Moderator
    #1087202

    Hi,

    In above snippet of code, I changed:

    return -a.localeCompare(b)

    to:

    return a.localeCompare(b)

    and it’s showing in order as you wish now: http://122.155.197.219/event/education/nsm-science-culture-camps.html#sort=attr.ct5.frontend_value

    Kindly check.

    ae.sakon Friend
    #1087398

    Hi,

    Finally!!!!! Big thank you for all of you.

    Thank you so much. 🙂

    Saguaros Moderator
    #1087399

    You’re welcome!

Viewing 15 posts - 1 through 15 (of 15 total)

This topic contains 15 replies, has 2 voices, and was last updated by  Saguaros 6 years, 10 months ago.

The topic ‘I want to set the JA Megafilter to show the newer to older.’ is closed to new replies.