tastyigniter / TastyIgniter

:fire: Powerful, yet easy to use, open-source online ordering, table reservation and management system for restaurants
https://tastyigniter.com
MIT License
3.04k stars 994 forks source link

Postcode not found V2.1.1 #219

Closed Twiggled closed 6 years ago

Twiggled commented 6 years ago

Expected behavior: Type in postcode and postcode is found and person can order

Actual behavior: Error message saying postcode can not be found.

Reproduce steps: No idea. It was working fine a week ago and then 3 days ago it all stopped working. I have tried replacing the API Key and nothing helps. So I made a new install and straight out of the box this issue is happening.

Version: (TastyIgniter version number) 2.1.1

Additional Information: (Additional information, if any) I have had a working site for 2 years with a few minor errors and now this has just happened. Has something changed in the google api I should be aware of.

Twiggled commented 6 years ago

Update:-. So Its strange. I have checked again and again and used customers postcodes to check who have ordered before and while not all of them work some do. Some random ones are working. I tried to order from one postcode and its fine. next street over and there postcode does not work.

any help much appreciated spent 2 days looking into this with no luck.

saravananshivaji commented 6 years ago

Is the delivery area set properly? please join Http://slack.tastyigniter.com the slack channel and we can debug the issue after.

Twiggled commented 6 years ago

Thanks will join now and just for people googling and finding this. Everything has been working for 2 years and nothing has changed in the past few weeks for this to go wrong. Delivery area is set correctly. However if I click repeatedly after entering the postcode it eventually accepts it.

saravananshivaji commented 6 years ago

This issue has been already addressed in 2.1.X (system/TastyIgniter/libraries/Location.php) -- see the getLatLng is passing the $map_Key in the googleapi url, also check the $map_key is not empty as shown below.

       $map_key = $this->CI->config->item('maps_api_key')
                         ? 'key='.$this->CI->config->item('maps_api_key').'&' : '';
       $url  = 'https://maps.googleapis.com/maps/api/geocode/json?'.$map_key
           .'address=' . urlencode($temp_query) .'&sensor=false'; 
sagansidhu commented 6 years ago

I have added new api key.. also updated the location.php but still same issue going on.

This restaurant currently does not deliver to your address

I can share the login details if somebody can help ASAP.. please

letssmokegood commented 6 years ago

I swear Twiggled it's little stuff like that which makes this software a pain in the ass, and instead of help they say it's been addressed here or there instead of actually posting helpful links or more articulate answers, i've wasted a load of time trying to get basic shit to work.

saravananshivaji commented 6 years ago

Hi,

I bet this is a issue with API (May be due to restrictions), as we are limited in support and people like you must help with committing the fixes or supporting new features. We can only support when we have time, as we are working on version 3.x we have a tight schedule. Hope you understand and help for the betterment.

Regards, Saran

sagansidhu commented 6 years ago

Hello Saran,

I have created a new API, but still it is not working.. could you please help ?

saravananshivaji commented 6 years ago

Hello Saran,

I have created a new API, but still it is not working.. could you please help ?

please join Http://slack.tastyigniter.com the slack channel and we can debug the issue after.

ianhaney commented 6 years ago

I am having this same issue in 2.1.1. can anyone help please? I have created new api key and still not working and keep getting the same message "This restaurant currently does not deliver to your address"

bongaquino commented 5 years ago

Where do you think here is the right one??? I cannot also resolve this postcode concern. If I use the first line, it gives me 404 error in the browser. If I use the second line, the postcode error shows...

            $url  = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($temp_query) .'&sensor=false'.'&key='.$this->CI->config->item('maps_api_key');

OR

           $url  = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($temp_query) .'&sensor=false';

I'm also using 2.1.1

Twiggled commented 5 years ago

Sorry I missed all the additional comments as I have been away due to illness. I joined the slack group and one of the guys was able to help me with a fix which I believe has been updated in the git hub code. We still have the odd issue with postcodes like it allowing postcodes that are not in the delivery area to order or it not charging the correct amount for the delivery area but 90% works.

I will see how our code was changed if anyone still needs this and post if I can. Hoping to get back into things next couple of months and help the team with version 3 in anyway I can as this has huge potential.

Twiggled commented 5 years ago

Additional note. I know some people get frustrated when these errors just happen but please remember this is open source and everyone gives there time freely. I for one am thankful for everything the main guys do to move this project forward. Thanks for everything guys.