|
@@ -119,10 +119,10 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
|
|
|
if(!empty($region_name)) $location->region_name = $region_name;
|
|
if(!empty($region_name)) $location->region_name = $region_name;
|
|
|
if(!empty($operations_manager_name)) $location->operations_manager_name = $operations_manager_name;
|
|
if(!empty($operations_manager_name)) $location->operations_manager_name = $operations_manager_name;
|
|
|
|
|
|
|
|
- $location->city = $city;
|
|
|
|
|
- $location->legal_entity_name = $legal_entity_name;
|
|
|
|
|
- $location->region = $region;
|
|
|
|
|
- $location->area_manager = $area_manager;
|
|
|
|
|
|
|
+ if(!empty($city)) $location->city = $city;
|
|
|
|
|
+ if(!empty($legal_entity_name)) $location->legal_entity_name = $legal_entity_name;
|
|
|
|
|
+ if(!empty($region)) $location->region = $region;
|
|
|
|
|
+ if(!empty($area_manager)) $location->area_manager = $area_manager;
|
|
|
|
|
|
|
|
$hours_parts = [];
|
|
$hours_parts = [];
|
|
|
if($opening_hours) $hours_parts[] = "Opening Hours: $opening_hours";
|
|
if($opening_hours) $hours_parts[] = "Opening Hours: $opening_hours";
|
|
@@ -135,7 +135,7 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$location->address_1 = str_replace(", $city", "", $address_1);
|
|
$location->address_1 = str_replace(", $city", "", $address_1);
|
|
|
- $location->postal_code = $postal_code;
|
|
|
|
|
|
|
+ if(!empty($postal_code)) $location->postal_code = $postal_code;
|
|
|
|
|
|
|
|
if(!$location->latitude) {
|
|
if(!$location->latitude) {
|
|
|
|
|
|