File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
BundleImportExport/Model/Import/Product/Type
ConfigurableImportExport/Model/Import/Product/Type Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ protected function parseOption($values)
238
238
protected function populateOptionTemplate ($ option , $ entityId , $ index = null )
239
239
{
240
240
$ populatedOption = [
241
+ 'option_id ' => null ,
241
242
'parent_id ' => $ entityId ,
242
243
'required ' => isset ($ option ['required ' ]) ? $ option ['required ' ] : 1 ,
243
244
'position ' => ($ index === null ? 0 : $ index ),
Original file line number Diff line number Diff line change @@ -817,6 +817,10 @@ public function saveData()
817
817
}
818
818
819
819
while ($ bunch = $ this ->_entityModel ->getNextBunch ()) {
820
+ if (!$ this ->configurableInBunch ($ bunch )) {
821
+ continue ;
822
+ }
823
+
820
824
$ this ->_superAttributesData = [
821
825
'attributes ' => [],
822
826
'labels ' => [],
@@ -860,6 +864,24 @@ public function saveData()
860
864
return $ this ;
861
865
}
862
866
867
+ /**
868
+ * @param $bunch
869
+ * @return bool
870
+ */
871
+ protected function configurableInBunch ($ bunch )
872
+ {
873
+ $ newSku = $ this ->_entityModel ->getNewSku ();
874
+ foreach ($ bunch as $ rowNum => $ rowData ) {
875
+ $ productData = $ newSku [$ rowData [\Magento \CatalogImportExport \Model \Import \Product::COL_SKU ]];
876
+ if (($ this ->_type == $ productData ['type_id ' ]) &&
877
+ ($ rowData == $ this ->_entityModel ->isRowAllowedToImport ($ rowData , $ rowNum ))
878
+ ) {
879
+ return true ;
880
+ }
881
+ }
882
+ return false ;
883
+ }
884
+
863
885
/**
864
886
* Validate row attributes. Pass VALID row data ONLY as argument.
865
887
*
You can’t perform that action at this time.
0 commit comments