|
@@ -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_code = readline("Type region code: ");
|
|
|
|
|
|
|
+$region_code = readline("Type region code (leave blank to skip geocoding): ");
|
|
|
|
|
|
|
|
$confirm = readline($customer->name . ": Confirm Y/N: ");
|
|
$confirm = readline($customer->name . ": Confirm Y/N: ");
|
|
|
if($confirm != "Y") die("Aborted");
|
|
if($confirm != "Y") die("Aborted");
|
|
@@ -145,7 +145,7 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
|
|
|
|
|
|
|
|
if(!empty($postal_code)) $location->postal_code = $postal_code;
|
|
if(!empty($postal_code)) $location->postal_code = $postal_code;
|
|
|
|
|
|
|
|
- if(!$location->latitude) {
|
|
|
|
|
|
|
+ if($region && !$location->latitude) {
|
|
|
|
|
|
|
|
for($attempt = 0; $attempt < 2; $attempt++) {
|
|
for($attempt = 0; $attempt < 2; $attempt++) {
|
|
|
|
|
|