Date filters not working

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

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #10687
    Grafikphase
    Grafikphase
    Participant

    Hi.

    First, let me say, this plugin is awesome, after I get all the details and functions! ?

    But I have a little problem with the Date filters. I setup the “from” and “to” date, but it seems that, the “from” date is also the “to” date. I tried different ways, but I can´t setup the “to” date right.
    Any ideas?
    Is it possible to set the “to” date to the current date? Just an idea for a usefull option.

    An other point with dates is, that I need a german format (dd. mm. yyyy) of the date. I can setup my custom date format for the results, but not for the search itself. How or where can I setup this format? Maybe, it´s an option to include it in the next versions.

    Thanks
    Maik

    Attachments:
    You must be logged in to view attached files.
    #10689
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you very much for your kind words!

    I’ve looked into the code part responsible for displaying the date, and there appears to be a minor issue there exactly as your described. To resolve it, you will have to make a change on one of the plugin files, just follow this guide:

    0. Before starting, make sure to have a back-up copy of everything. I once accidentally deleted my website root directory, and struggled without back-up.

    1. Open up the wp-content\plugins\ajax-search-pro\includes\views\asp.shortcode.date_filters.php plugin file on your server and navigate to line 28, which is:

    $_dft_v = $_dff['date'];

    .. this is the problematic code.

    2. Change that line to simply:

    $_dft_v = $_dft['date'];

    3. Save the file, and re-load the search page, it should be okay now.

    —–
    The date format is unfortunately hard coded within the javascript files, which would not be an issue to change, but there is a bigger problem. The format is used as it is (without conversion), so changing it will break it’s functionality immediately. I’m definitely going to add an option into the upcoming release to change the format.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #10690
    Grafikphase
    Grafikphase
    Participant

    Hi Ernest,

    thanks for your ultra-fast reply. 🙂

    Sounds great, if there will be an option in the future. Maybe it´s possible to use directly the date format from wordpress, so every user get the best result for own usage.

    Just one more time the last question about using the current date? Have you any working quick tip for this? Because it´s getting boring to change the date every day, week or month to a “current” date not to far in the future.

    Thanks again and keep going with your plugin and the great support.
    Maik

    #10691
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Maik,

    You are very welcome!

    I believe that’s actually a great idea. Usually everyone uses the same date format as set on the wordpress back-end.

    To use the current date, just use the “Relative Date” value, with all values set to 0, it will results in the current date: https://i.imgur.com/kLt8gnT.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #10714
    Grafikphase
    Grafikphase
    Participant

    Hi Ernest,

    Great idea to use relative date, this was to easy and I only focused on the other value. My fault… 🙂

    I changed the file like you discribed. Now I have 2 areas with “from” and “to” dates. The first block works fine now, but now there is another one. I also checked the file again and again, but also if replacing the backup file, I have these 2 blocks now. Any ideas why this happens?

    2 days ago I also have seen my category filter, but now it´s gone although the option is still active. I don´t change anything the last 2 days. Maybe it´s a server or script problem I can not debug atm.

    (Another little question is about cross browser design for the frontend settings. In Firefox, it looks great, but Chrome and Safari don´t break into nice rows like FF does.)

    I hope, we can fix this and thanks for your patience.
    Maik

    • This reply was modified 6 years, 2 months ago by Grafikphase Grafikphase. Reason: adding frontend design question
    Attachments:
    You must be logged in to view attached files.
    #10716
    Grafikphase
    Grafikphase
    Participant
    You cannot access this content.
    #10724
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    The configuration looks all right, I’m guessing that while editing the files something might went wrong there.

    Can you also provide temporary FTP access? I don’t want to use the wordpress plugin file editor on the back-end, as it can break the site if I make a code syntax error accidentally.

    Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #10725
    Grafikphase
    Grafikphase
    Participant
    You cannot access this content.
    #10727
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #10728
    Grafikphase
    Grafikphase
    Participant

    Great,

    thank you Ernest!
    You deserve a 6-star rating. 🙂

    Best,
    Maik

    #10729
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

The topic ‘Date filters not working’ is closed to new replies.