Advertisement:

Author Topic: Veronika MB Theme and Algolia Places Plugin  (Read 114 times)

leuname07

  • Newbie
  • *
  • Posts: 39
Veronika MB Theme and Algolia Places Plugin
« on: June 09, 2019, 01:53:13 am »
Hello,


I noticed that users are blocking when inserting ads because there are not all cities listed with autocomplete. I am in Switzerland and in the database osclass, it misses a lot of information.

I found the plugin Algolia Places and I installed it.

But you have to adapt it to the theme and this information.

Before this plugin can work, we have to disable the used autocomplete script for locations in the theme! How can i make this ?

in index.php maybe you have to modify some container names in the used javascript, to work with your theme

Code: [Select]
<script>
$(document).ready(function(){   
    $("#sCountry").on("change", function(event){       
        var selCountry = $(this).val().toLowerCase();
        var parent = $("#sCity").parent("span");           
        $("#sCity").val("");
       
        loadPlaces("'.$locale.'", (selCountry.length >=1 ? selCountry : "'.($countries ? $countries : 'none').'")'.(!empty($appid) && !empty($appkey) ? ', "'.$appid.','.$appkey.'"' : '').');     
    });       
    loadPlaces("'.$locale.'", "'.($countries ? $countries : 'none').'"'.(!empty($appid) && !empty($appkey) ? ', "'.$appid.','.$appkey.'"' : '').');   
});
</script>


Thank you for your help !