Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Different behavior in live search vs search results page
This topic contains 4 replies, has 2 voices, and was last updated by linkitaly17 3 years, 4 months ago.
- AuthorPosts
- January 17, 2020 at 11:12 am #25322
We are using your plug-in to search in our WooCommerce store. We added the product SKU in your plug-in search criteria but it only works in live search and not in the results page.
For example, if you enter the SKU code “CVS LK01N6S2” in the search box, the live search correctly shows the product but if you hit Enter to load the WooCommerce search page the list shows empty.
Is it a bug or did we forget to enable something?
January 17, 2020 at 12:45 pm #25326Hi,
Make sure that the search results override feature is enabled, that should do the trick.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 17, 2020 at 2:56 pm #25331Thank you for the quick answer. Unfortunately it was already enabled. What is strange is that it works correctly with any other keyword, just not with the SKU.
January 17, 2020 at 4:33 pm #25334Hi,
I noticed you are using an elementor template for that page.
Recently a similar issue was reported, it only occured twice so far. There was a problem with the detection of the query, and I had to directly modify one of the files.
For now, you should be able to resolve it via a small custom code snippet, until the next release is out. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
Best,add_filter('asp_query_is_search', 'asp_query_is_search_override', 10, 2); function asp_query_is_search_override( $is_search, $wp_query ) { return method_exists($wp_query, 'is_search') && $wp_query->is_search(); }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 20, 2020 at 3:33 pm #25355Thank you, at first the code seemed to solve the problem but then I realized that it broke other Elementor widgets.
Since you say you’re aware of this problem and you are going to fix it with next release, I guess I’ll just have to wait for next release.
Thanks a lot for your support.
- AuthorPosts
You must be logged in to reply to this topic.