• Hi,
    When I have multiple pages of property data and use the sortby function the sorting works fine.

    However, if I happen to be on page 3 of the listings when I select the sort options it remains on page 3 after sorting instead of returning back to the start of the listings.

    Is there a way I can force it back to page 1 when I choose a sort option ?

    Thanks,

    Pete

    https://www.ads-software.com/plugins/easy-property-listings/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Dear ridgetek,

    No. This is the behaviour by default in version 3.0.4 (the current version at time I write this). I had the same problem.

    I resolved my problem modifing the way the URL is recalled in EPL/lib/assets/js/jquery-front-scripts.js file.

    1. Search for the comment “/* Sort properties by price */” in this file. This is the function to recreate the URL to be called after the search.

    2. After variables declaration, insert this code:

    var where = url.search('page');
    
    if (where > -1) {
    	var url = url.substring(0,where);
    }

    url is the variable that contains the current URL. The code above locates the word “page” and passes to the url variable only the part before the word, forcing the site to return to the first page.

    Saúde!
    Marco Andrei

    Thread Starter ridgetek

    (@ridgetek)

    Thank you for the response – appreciated.

    Plugin Author Merv Barrett

    (@mervb1)

    Marking this as an Issue in GitHub for a fix for 3.1 Thanks for letting us know Pete and Marco

    Merv,

    Tudo bem?

    IMHO, I think it would be nice to have the option to choose what behavior the user wants to have.

    Saúde!
    Marco

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sorting Issue’ is closed to new replies.