Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Date filters not working
This topic contains 10 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 2 months ago.
- AuthorPosts
- November 2, 2016 at 1:39 pm #10687
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
MaikAttachments:
You must be logged in to view attached files.November 2, 2016 at 2:18 pm #10689Hi!
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.
—–
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 2, 2016 at 2:33 pm #10690Hi 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.
MaikNovember 2, 2016 at 2:37 pm #10691Hi 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 :)
November 3, 2016 at 11:45 pm #10714Hi 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. Reason: adding frontend design question
Attachments:
You must be logged in to view attached files.November 3, 2016 at 11:50 pm #10716You cannot access this content.November 4, 2016 at 12:52 pm #10724Hi,
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 :)
November 4, 2016 at 1:22 pm #10725You cannot access this content.November 4, 2016 at 1:51 pm #10727You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 4, 2016 at 2:00 pm #10728Great,
thank you Ernest!
You deserve a 6-star rating. 🙂Best,
MaikNovember 4, 2016 at 2:02 pm #10729You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This reply was modified 6 years, 2 months ago by
- AuthorPosts
The topic ‘Date filters not working’ is closed to new replies.