Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search terms both plural and singular.
This topic contains 9 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 1 month ago.
- AuthorPosts
- March 6, 2018 at 12:02 pm #17020
I would like a user to search for both ‘glass’ and ‘glasses’ or ‘pot’ and ‘pots’ and get the same results.
Woocommerce Products search only.
I may have missed something in the configurations.I would appreciate the help.
harry
March 6, 2018 at 1:53 pm #17023Hi Harry,
Understanding plural/singular nouns is way beyond the plugins capabilities. It would require a very sophisticated dictionary as well as understanding all singular/plural rules of each language, and a very powerful server to process this information.
There are a few compact solutions, but unfortunately none of them work properly, not even for english language.The plugin simply matches the keywords given to the fields chosen by executing a database query. Perhaps the easiest solution in this case are:
– Using the additional keywords field, that allows asigning more search keywords
– Using a custom code to replace search phrases with others: Knowledge base – Replacing search keywordsThe first solution is neat for cases where there is only a handful of products that you want to assign custom keywords to. The second solution is more generic, as it replaced wth words within the search phrase directly – for example you can assign the keyword ‘glasses’ to be replaced simply by ‘glass’.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 7, 2018 at 12:48 am #17033Hi Ernest,
Thanks for the prompty reply.
I understand, I will try to work a way around it.I do have another question though.
After a search is made and the user clicks in the search field again to make a new search can we have the cross to show up or the previous keyword to disappear?Currently user has to delete the keyword themselves.
Thanks in advance,
HarryMarch 8, 2018 at 3:26 pm #17042Hi Harry,
I believe displaying the close icon should be possible when the input is focused, by using a small custom code snippet.
Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 9, 2018 at 4:07 am #17048Hi Ernest,
Thanks for the help.
I am amfraid its not actually removing the serch term form the serch field. The cross icon is showing now but no action when clicked.
Can you you look into it for me.
Thanks
HarryMarch 9, 2018 at 10:16 am #17052Hi Harry,
You are right, I was not testing that correctly.
Try this one instead, it should be better:
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 9, 2018 at 10:42 am #17054Thank You Ernest. Now its fine.
My apologies but I do have another question.
How can user search for SKU of each prodiuct ? What configuration is needed?
Harry
March 9, 2018 at 11:12 am #17057Hi,
On the General Options -> Sources panel, search and select the ‘_sku’ custom field: https://i.imgur.com/uTdC1jW.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2018 at 4:12 am #17080Thanks Ernest.
One last question.
How can I show the floating search icon only for mobile version?Thanks in advance.
HarryMarch 12, 2018 at 1:10 pm #17090Hi Harry,
For each search instance you can adjust on which devices it should be visible. On the General Options -> Mobile Behavior panel you can change that: https://i.imgur.com/74Kwi2p.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Search terms both plural and singular.’ is closed to new replies.