Austra02 Posted August 19, 2017 Share Posted August 19, 2017 (edited) Hi All, I've got a strange issue with my 'Store Contacts' not showing some stores when a Postal Code search is done - even if the exact same postal code as a store is used for the search. I'm using: 1.6.1.11 Others stores display okay, but some don't. All the settings for the stores not displaying are correct; there are no strange characters in the setting for the store, but it just won't display. I've set the Store Contacts to one store that works and one that doesn't to show this issue: https://glindawand.com.au/stores If a postal code search is performed for 2009, it shows no stores, even though I have a store registered with a postal code of 2009. If you change the search to 2015, it works. If a search for 4006 (the postal code of the other store), it shows up correctly. I've done all the usuals as well: cleared the cache; turned on recompiled, etc., but nothing is working. I hope someone can help with this, as my retailers are getting annoyed when their store doesn't display. Thanks in advance, Scott. Edited August 19, 2017 by Austra02 (see edit history) Link to comment Share on other sites More sharing options...
olkuznw Posted August 24, 2017 Share Posted August 24, 2017 Hi! I've checked your store and find the reason. Problem connected with google maps response, if you check request in developer console with postal code 2009 then you will see areas in next order: 1) 2009, Chang Wat Kalasin, Thailand location: {lat: 16.7367457, lng: 103.296235} 2) 2009 Pitt St, Sydney NSW 2000, Australia location: {lat: -33.8701143, lng: 151.2094018} 3) ... Next PrestaShop makes request for 'stores' controller and takes location from google maps respone: latitude:16.7367457 longitude:103.29623500000002 It's because in stores.js first location is used: searchLocationsNear(results[0].geometry.location); You can add loop in stores.js and check country in location response from google. 1 Link to comment Share on other sites More sharing options...
Austra02 Posted September 2, 2017 Author Share Posted September 2, 2017 Hi! I've checked your store and find the reason. Problem connected with google maps response, if you check request in developer console with postal code 2009 then you will see areas in next order: 1) 2009, Chang Wat Kalasin, Thailand location: {lat: 16.7367457, lng: 103.296235} 2) 2009 Pitt St, Sydney NSW 2000, Australia location: {lat: -33.8701143, lng: 151.2094018} 3) ... Next PrestaShop makes request for 'stores' controller and takes location from google maps respone: latitude:16.7367457 longitude:103.29623500000002 It's because in stores.js first location is used: searchLocationsNear(results[0].geometry.location); You can add loop in stores.js and check country in location response from google. WOW! Thanks so much!! The only thing is I must admit I have no idea how to add a 'loop' into the stores.js. Are you able to help with this? Thanks again; I really appreciate this! Cheers, Scott. Link to comment Share on other sites More sharing options...
olkuznw Posted September 2, 2017 Share Posted September 2, 2017 Hi, sure, I can help you. You can let me know with private message. Link to comment Share on other sites More sharing options...
MilanaBezi Posted May 31, 2020 Share Posted May 31, 2020 Hey. And can I add 2 different addresses for the agency singapore-visa.net and both display on Google maps? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now