@@ -492,15 +492,13 @@ protected function _prepareDataForUpdate(array $rowData)
492
492
{
493
493
$ email = strtolower ($ rowData [self ::COLUMN_EMAIL ]);
494
494
$ customerId = $ this ->_getCustomerId ($ email , $ rowData [self ::COLUMN_WEBSITE ]);
495
-
496
495
// entity table data
497
496
$ entityRowNew = [];
498
497
$ entityRowUpdate = [];
499
498
// attribute values
500
499
$ attributes = [];
501
500
// customer default addresses
502
501
$ defaults = [];
503
-
504
502
$ newAddress = true ;
505
503
// get address id
506
504
if (isset (
@@ -520,7 +518,6 @@ protected function _prepareDataForUpdate(array $rowData)
520
518
'parent_id ' => $ customerId ,
521
519
'updated_at ' => (new \DateTime ())->format (\Magento \Framework \Stdlib \DateTime::DATETIME_PHP_FORMAT ),
522
520
];
523
-
524
521
foreach ($ this ->_attributes as $ attributeAlias => $ attributeParams ) {
525
522
if (array_key_exists ($ attributeAlias , $ rowData )) {
526
523
if (!strlen ($ rowData [$ attributeAlias ])) {
@@ -554,15 +551,13 @@ protected function _prepareDataForUpdate(array $rowData)
554
551
}
555
552
}
556
553
}
557
-
558
554
foreach (self ::getDefaultAddressAttributeMapping () as $ columnName => $ attributeCode ) {
559
555
if (!empty ($ rowData [$ columnName ])) {
560
556
/** @var $attribute \Magento\Eav\Model\Entity\Attribute\AbstractAttribute */
561
557
$ table = $ this ->_getCustomerEntity ()->getResource ()->getTable ('customer_entity ' );
562
558
$ defaults [$ table ][$ customerId ][$ attributeCode ] = $ addressId ;
563
559
}
564
560
}
565
-
566
561
// let's try to find region ID
567
562
$ entityRow ['region_id ' ] = null ;
568
563
if (!empty ($ rowData [self ::COLUMN_REGION ])) {
@@ -575,7 +570,6 @@ protected function _prepareDataForUpdate(array $rowData)
575
570
$ entityRow ['region_id ' ] = $ regionId ;
576
571
}
577
572
}
578
-
579
573
if ($ newAddress ) {
580
574
$ entityRowNew = $ entityRow ;
581
575
$ entityRowNew ['created_at ' ] =
0 commit comments