File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
CatalogImportExport/Model/Import
ImportExport/Model/Import Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1158,6 +1158,7 @@ protected function _saveProductsData()
11581158 if ($ this ->_replaceFlag ) {
11591159 $ this ->getOptionEntity ()->clearProductsSkuToId ();
11601160 }
1161+ $ this ->getOptionEntity ()->setIds ($ this ->getIds ());
11611162 $ this ->getOptionEntity ()->importData ();
11621163 return $ this ;
11631164 }
Original file line number Diff line number Diff line change @@ -1256,7 +1256,7 @@ protected function _importData()
12561256 $ prevOptionId = 0 ;
12571257 $ optionId = null ;
12581258 $ valueId = null ;
1259- while ($ bunch = $ this ->_dataSourceModel ->getNextBunch ( )) {
1259+ while ($ bunch = $ this ->_dataSourceModel ->getNextUniqueBunch ( $ this -> getIds () )) {
12601260 $ products = [];
12611261 $ options = [];
12621262 $ titles = [];
Original file line number Diff line number Diff line change @@ -421,9 +421,7 @@ protected function _saveValidatedBunches()
421421 $ startNewBunch = false ;
422422
423423 $ source ->rewind ();
424- if ($ source instanceof Base64EncodedCsvData) {
425- $ this ->_dataSourceModel ->cleanProcessedBunches ();
426- } else {
424+ if (!$ source instanceof Base64EncodedCsvData) {
427425 $ this ->_dataSourceModel ->cleanBunches ();
428426 }
429427 $ mainAttributeCode = $ this ->getMasterAttributeCode ();
Original file line number Diff line number Diff line change @@ -395,9 +395,7 @@ protected function _saveValidatedBunches()
395395 $ skuSet = [];
396396
397397 $ source ->rewind ();
398- if ($ source instanceof Base64EncodedCsvData) {
399- $ this ->_dataSourceModel ->cleanProcessedBunches ();
400- } else {
398+ if (!$ source instanceof Base64EncodedCsvData) {
401399 $ this ->_dataSourceModel ->cleanBunches ();
402400 }
403401
@@ -911,4 +909,9 @@ public function getIds()
911909 {
912910 return $ this ->ids ;
913911 }
912+
913+ public function setIds ($ ids )
914+ {
915+ $ this ->ids = $ ids ;
916+ }
914917}
You can’t perform that action at this time.
0 commit comments