Take Store City from Database as Search Result
-
Hey,
I have modified your search filter.What I want is to fetch Store City from the Database and show it.
Right now, It is doing it based on latitude and longitude.But I don’t want to use latitude and longitude as it is using radius and all.What I want is simple select query which find specific city and show it.
What I have modified till now is wpsl-gmap.js, custom template(which is having select box of Cities for search filter purpose) and I don’t find right direction to change wpsl-ajax-functions.php
Change in wpsl-gmap.js:
$( ".btn" ).on( "click", function() { var inputURL = $( "#area option:selected" ).text(); var keepStartMarker = false; $( "#wpsl-search-input" ).removeClass(); if ( !$( "#wpsl-search-input" ).val() ) /*$( "#wpsl-search-input" ).addClass( "wpsl-error" ).focus();*/ $( "#wpsl-result-list ul" ).empty(); $( "#wpsl-stores" ).show(); $( ".wpsl-direction-before, .wpsl-direction-after" ).remove(); $( "#wpsl-direction-details" ).hide(); resetMap = false; deleteOverlays( keepStartMarker ); deleteStartMarker(); codeAddress(); });
So its working perfectly.But as I said, I don’t to use longitude or anything.I just want, When User select any city name from the select box, it should give result by fetching that city name from the Database.
Can you please help me for this as I am trying for few days but not getting any success.
Thanks Tijmen.
- The topic ‘Take Store City from Database as Search Result’ is closed to new replies.