This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

spyridon

  • *
  • 3 posts
Location autocomplete with a 3 letter set anywhere in the word
« on: October 06, 2017, 04:00:42 PM »
Hello,

I have purchased the Veronika theme via osclass market store and I am currently setting it up.

I would like to ask how can I achieve the following.

When searching for a location it prompts the user to enter a least 3 letters. It seems that the search function only looks for the string location that starts with these 3 letters only, not any set of 3 letters anywhere in the location word.

Example location name : Agia Anna.

When I start my search query "Agi" I got the result as expected, but when I search for "Ann" the search cannot seems to find the term "Agia Anna" and responds region, city, location not found.

Any help would be appreciated.
« Last Edit: October 06, 2017, 04:27:56 PM by spyridon »

*

MB Themes

Re: Location autocomplete with a 3 letter set anywhere in the word
« Reply #1 on: October 06, 2017, 08:38:08 PM »
It is because performance as such search is veey expensive.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

spyridon

  • *
  • 3 posts
Re: Location autocomplete with a 3 letter set anywhere in the word
« Reply #2 on: October 07, 2017, 09:05:29 AM »
Hello again,

Thank you for your reply.

To be honest I didnt understand what you mean. I suppose you mean it is implemented this way for performance reasons.

Is this something that it is impossimple to achieve, or is it just not recommended?

If it is possible to do it, could you please direct me which line of code needs to be changed to achieve this?

Regards,
Spyridon

*

spyridon

  • *
  • 3 posts
Re: Location autocomplete with a 3 letter set anywhere in the word
« Reply #3 on: October 08, 2017, 10:12:55 PM »
I suppose it doesn't matter any more for me, I have bought the Zara theme package as it suits better my needs.

Maybe someone else might be interested to follow up this thread.

Marked as best answer by spyridon on October 10, 2017, 08:43:14 AM
*

MB Themes

Re: Location autocomplete with a 3 letter set anywhere in the word
« Reply #4 on: October 09, 2017, 10:23:17 AM »
@spyridon
In file:
oc-content/themes/veronika/contact.php

Find codes (multiple times):
Code: [Select]
like "' . $term . '%"
change it to:
Code: [Select]
like "%' . $term . '%"
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots