File tree 1 file changed +6
-2
lines changed
app/code/Magento/CustomerImportExport/Model/Import 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,12 @@ protected function _validateRowForUpdate(array $rowData, $rowNumber)
593
593
if (in_array ($ attributeCode , $ this ->_ignoredAttributes )) {
594
594
continue ;
595
595
}
596
+ if ($ attributeParams ['is_required ' ]
597
+ && ((!isset ($ rowData [$ attributeCode ]) && !$ this ->_getCustomerId ($ email , $ website ))
598
+ || (isset ($ rowData [$ attributeCode ]) && '' === trim ($ rowData [$ attributeCode ])))) {
599
+ $ this ->addRowError (self ::ERROR_VALUE_IS_REQUIRED , $ rowNumber , $ attributeCode );
600
+ continue ;
601
+ }
596
602
if (isset ($ rowData [$ attributeCode ]) && strlen ($ rowData [$ attributeCode ])) {
597
603
$ this ->isAttributeValid (
598
604
$ attributeCode ,
@@ -603,8 +609,6 @@ protected function _validateRowForUpdate(array $rowData, $rowNumber)
603
609
? $ this ->_parameters [Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR ]
604
610
: Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
605
611
);
606
- } elseif ($ attributeParams ['is_required ' ] && !$ this ->_getCustomerId ($ email , $ website )) {
607
- $ this ->addRowError (self ::ERROR_VALUE_IS_REQUIRED , $ rowNumber , $ attributeCode );
608
612
}
609
613
}
610
614
}
You can’t perform that action at this time.
0 commit comments