Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • alves Friend
    #1070046

    Hello, I would like to know how to filter in reverse order. By the panel I can only sort by alphabetical order, I need to sort by reverse alphabetical order.

    • This topic was modified 6 years, 11 months ago by  alves.
    Mr.Cat Moderator
    #1070407

    @alves,

    Reserse order is already included when you choose alphabetical order. You can see it on our demo

    http://joomla-extensions.demo.joomlart.com/index.php/ja-k2-filter/horizontal-layout?issearch=1&isc=1&category_id=10,9,7,8&orders%5Bxf4%5D=rxf4

    Regards

    Wisdom is not a product of schooling but of the lifelong attempt to acquire it.

    alves Friend
    #1071434

    I need this function in the component listing, not in the search module.

    Mr.Cat Moderator
    #1071487

    @alves,

    Got it. You can do this tweak to get reverse order.

    Open file /components/com_jak2filter/models/itemlist.php , go to line number 59 and replace the code of block next to it by this one

    if ($jaK2FilterParams->get('catOrdering')) {
        $catOrdering = $jaK2FilterParams->get('catOrdering');
        $substr =  substr($catOrdering, 0, 1); 
        if ($substr == 'r') {
            $str = substr($catOrdering, 1);
            $order_fields[$str] = $catOrdering;
        } else {
            $order_fields[$catOrdering] = $catOrdering;
        }
    
    }

    Then open file /modules/mod_jak2filter/helper.php, go to line 1537 , remove the code comment.

    "Title – reverse alphabetical" will appear as an option on component config. Check the screenshot below for more detail.

    Regards


    1. 2017-11-01_095500
    2. 2017-11-01_095540
    3. 2017-11-01_100137

    Wisdom is not a product of schooling but of the lifelong attempt to acquire it.

    alves Friend
    #1073657

    Hello, I am immensely grateful for your help, I was able to do what you reported, but it did not work for what I need. See the attached image so you can understand better.

    Thank you very much for your attention.


    1. demo
    Mr.Cat Moderator
    #1073851

    @alves,

    My bad, you can open file /modules/mod_jak2filter/helper.php, go to line 1568, remove the code comment. The reverse option will show 🙂

    See my attachment below

    • This reply was modified 6 years, 11 months ago by  Saguaros.

    1. 2017-11-13_100326

    Wisdom is not a product of schooling but of the lifelong attempt to acquire it.

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

This topic contains 5 replies, has 2 voices, and was last updated by  Mr.Cat 6 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum