+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Restrict Autocomplete on only few countries???

Hybrid View

  1. #1

    Restrict Autocomplete on only few countries???

    hi guys

    when typing in search i get too much autocomplete options from Asia And Africa which i do not need, so i wanted to restrict it to only 2 or 3 countries to get cities only from those countries.

    can anyone help me where that file is and how can make a restriction?

    thanks in advance

  2. #2
    Senior Member
    Join Date
    Nov 2016
    Location
    USA
    Posts
    110
    we already talking about it here http://forum.flynax.com/showthread.p...t=Autocomplete

    i guess flynax dont see it as important as we do.

  3. #3
    Hello All,

    Ok try to change your code to mine. But please create backup of the file Open file: ftp://templates>>your_template>>js>>lib.js

    find code:

    Code:
    Only registered members can view the code.
    and replace to:
    Code:
    Only registered members can view the code.
    also find line:
    Code:
    Only registered members can view the code.
    and add more ISO country codes.
    Viktor,
    Flynax technical department,
    Best wishes.

  4. #4
    thank you viktor.

    i could not find identical code to yours but i found a similar so im not sure how to get it done. by the way my flynax version is 4.6.0

    Code:
    Only registered members can view the code.
    Last edited by Jasmin Toromanovic; November 17, 2017 at 07:06 AM.

  5. #5
    Junior Member
    Join Date
    Nov 2017
    Posts
    2
    I have to do the same thing i want to restrict for 1 country the search bar. I went to that file lib.js and tried my best to change the code for 1 country but it didnt work then i removed all the code for which you are showing above. Search bar still working. Kindly tell me the path of that code where from search bar getting all countries data. Thanks

  6. #6
    Hello Jasmin,

    Would you please send lib.js file to my PM. I will check your file.
    Viktor,
    Flynax technical department,
    Best wishes.

  7. #7
    Senior Member
    Join Date
    Nov 2016
    Location
    USA
    Posts
    110
    Hi Viktor,
    i tried your solution but it didn't work it still shows auto completes from other countries
    i am using 4.5.1

  8. #8
    Quote Originally Posted by Samir Fakirane View Post
    Hi Viktor,
    i tried your solution but it didn't work it still shows auto completes from other countries
    i am using 4.5.1
    solution that victor offers is 100% functioning for me... the only problem might be that you have some other version than he has. if it continues showing other countries in the browser than it is a cache issue.

    thanks viktor

  9. #9
    Hello Samir,

    At first I want to say - You are welcome Jasmin

    I see your code and if you want to set Morocco country code you should use MA instead of MAR. I wrote above that you should use I mean: ISO 3166 code. Read here: https://en.wikipedia.org/wiki/ISO_3166-2
    Only 2 chars.
    Change it in lib.js file and try again. I hope it will work.
    Viktor,
    Flynax technical department,
    Best wishes.

  10. #10
    Senior Member
    Join Date
    Nov 2016
    Location
    USA
    Posts
    110
    Hi Victor thank you for your reply,
    i did set it to MA and still don't have it working, i did clear all my cache.
    i will test it more and report
    Last edited by Samir Fakirane; November 19, 2017 at 03:04 AM.

+ Reply to Thread