Skip to content

Commit 7e5f5da

Browse files
AnujNehraAnujNehra
authored andcommitted
ACP2E-2301: Customers and Addresses (single file) Import fails
1 parent 968fb3e commit 7e5f5da

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

app/code/Magento/CustomerImportExport/Model/Import/Address.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ protected function _importData()
534534
$deleteRowIds = [];
535535

536536
foreach ($bunch as $rowNumber => $rowData) {
537+
if (!isset($rowData['_website'])) {
538+
continue;
539+
}
537540
// check row data
538541
if ($this->_isOptionalAddressEmpty($rowData) || !$this->validateRow($rowData, $rowNumber)) {
539542
continue;

app/code/Magento/CustomerImportExport/Model/Import/Customer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ protected function _importData()
519519
$attributesToSave = [];
520520

521521
foreach ($bunch as $rowNumber => $rowData) {
522+
if (!isset($rowData['_website'])) {
523+
continue;
524+
}
522525
if (!$this->validateRow($rowData, $rowNumber)) {
523526
continue;
524527
}

app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/CustomerComposite/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function getNextUniqueBunch($ids = null)
8080
protected function _prepareRow(array $rowData)
8181
{
8282
$entityCustomer = CustomerComposite::COMPONENT_ENTITY_CUSTOMER;
83-
if ($this->_entityType == $entityCustomer) {
83+
if ((isset($rowData['_scope'])) && $this->_entityType == $entityCustomer) {
8484
if ($rowData['_scope'] == CustomerComposite::SCOPE_DEFAULT) {
8585
return $rowData;
8686
} else {

0 commit comments

Comments
 (0)