|
@@ -9,7 +9,7 @@ $customer_id = readline("Type customer ID: ");
|
|
|
$customer = Customer::get($customer_id);
|
|
$customer = Customer::get($customer_id);
|
|
|
if(!$customer) die("Customer not found.");
|
|
if(!$customer) die("Customer not found.");
|
|
|
|
|
|
|
|
-$region = readline("Type region code: ");
|
|
|
|
|
|
|
+$region_code = readline("Type region code: ");
|
|
|
|
|
|
|
|
$confirm = readline($customer->name . ": Confirm Y/N: ");
|
|
$confirm = readline($customer->name . ": Confirm Y/N: ");
|
|
|
if($confirm != "Y") die("Aborted");
|
|
if($confirm != "Y") die("Aborted");
|
|
@@ -147,7 +147,7 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- $results = Geolocation::geocode($query, $region);
|
|
|
|
|
|
|
+ $results = Geolocation::geocode($query, $region_code);
|
|
|
if($results) {
|
|
if($results) {
|
|
|
$result = $results[0];
|
|
$result = $results[0];
|
|
|
$location->latitude = $result->geometry->location->lat;
|
|
$location->latitude = $result->geometry->location->lat;
|