|
|
@@ -24,6 +24,14 @@ for($i = 0; $line = fgetcsv($handle); $i++) {
|
|
|
|
|
|
list($internal_id, $city, $legal_entity_name, $region, $area_manager, $opening_hours, $closing_hours, $name, $address, $postal_code) = $line;
|
|
|
|
|
|
+ $email = null;
|
|
|
+ $latitude = null;
|
|
|
+ $longitude = null;
|
|
|
+
|
|
|
+ if(!empty($line[10])) $email = $line[10];
|
|
|
+ if(!empty($line[11])) $latitude = $line[11];
|
|
|
+ if(!empty($line[12])) $longitude = $line[12];
|
|
|
+
|
|
|
if(empty($city)) continue;
|
|
|
|
|
|
echo "Importing $internal_id - $city ... ";
|
|
|
@@ -39,6 +47,10 @@ for($i = 0; $line = fgetcsv($handle); $i++) {
|
|
|
$location->internal_id = $internal_id;
|
|
|
}
|
|
|
|
|
|
+ if(!empty($email)) $location->email = $email;
|
|
|
+ if(!empty($latitude)) $location->latitude = $latitude;
|
|
|
+ if(!empty($longitude)) $location->longitude = $longitude;
|
|
|
+
|
|
|
$location->city = $city;
|
|
|
$location->legal_entity_name = $legal_entity_name;
|
|
|
$location->region = $region;
|