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

Thread: Restrict Autocomplete on only few countries???

  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
    Hello Jasmin,

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

  6. #6
    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

  7. #7
    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

  8. #8
    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.

  9. #9
    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.

  10. #10
    Senior Member
    Join Date
    Sep 2014
    Posts
    125
    Yeah seems like it not working, I tried but never worked

+ Reply to Thread