@@ -876,7 +876,8 @@ protected function collectRawData()
876
876
if ($ this ->_attributeTypes [$ code ] !== 'multiselect ' ) {
877
877
if (is_scalar ($ attrValue )) {
878
878
if (!in_array ($ fieldName , $ this ->_getExportMainAttrCodes ())) {
879
- $ additionalAttributes [$ fieldName ] = $ fieldName . ImportProduct::PAIR_NAME_VALUE_SEPARATOR . $ attrValue ;
879
+ $ additionalAttributes [$ fieldName ] = $ fieldName .
880
+ ImportProduct::PAIR_NAME_VALUE_SEPARATOR . $ attrValue ;
880
881
}
881
882
$ data [$ itemId ][$ storeId ][$ fieldName ] = $ attrValue ;
882
883
} else {
@@ -886,7 +887,8 @@ protected function collectRawData()
886
887
}
887
888
888
889
if (!empty ($ additionalAttributes )) {
889
- $ data [$ itemId ][$ storeId ][self ::COL_ADDITIONAL_ATTRIBUTES ] = implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ additionalAttributes );
890
+ $ data [$ itemId ][$ storeId ][self ::COL_ADDITIONAL_ATTRIBUTES ] =
891
+ implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ additionalAttributes );
890
892
} else {
891
893
unset($ data [$ itemId ][$ storeId ][self ::COL_ADDITIONAL_ATTRIBUTES ]);
892
894
}
@@ -1024,7 +1026,8 @@ protected function addMultirowData($dataRow, $multiRawData)
1024
1026
foreach ($ multiRawData ['rowWebsites ' ][$ productId ] as $ productWebsite ) {
1025
1027
$ websiteCodes [] = $ this ->_websiteIdToCode [$ productWebsite ];
1026
1028
}
1027
- $ dataRow ['_product_websites ' ] = implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ websiteCodes );
1029
+ $ dataRow ['_product_websites ' ] =
1030
+ implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ websiteCodes );
1028
1031
$ multiRawData ['rowWebsites ' ][$ productId ] = [];
1029
1032
}
1030
1033
if (!empty ($ multiRawData ['mediaGalery ' ][$ productId ])) {
@@ -1034,8 +1037,10 @@ protected function addMultirowData($dataRow, $multiRawData)
1034
1037
$ additionalImages [] = $ mediaItem ['_media_image ' ];
1035
1038
$ additionalImageLabels [] = $ mediaItem ['_media_label ' ];
1036
1039
}
1037
- $ dataRow ['additional_images ' ] = implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ additionalImages );
1038
- $ dataRow ['additional_image_labels ' ] = implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ additionalImageLabels );
1040
+ $ dataRow ['additional_images ' ] =
1041
+ implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ additionalImages );
1042
+ $ dataRow ['additional_image_labels ' ] =
1043
+ implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ additionalImageLabels );
1039
1044
$ multiRawData ['mediaGalery ' ][$ productId ] = [];
1040
1045
}
1041
1046
foreach ($ this ->_linkTypeProvider ->getLinkTypes () as $ linkTypeName => $ linkId ) {
@@ -1045,15 +1050,17 @@ protected function addMultirowData($dataRow, $multiRawData)
1045
1050
$ associations = [];
1046
1051
foreach ($ multiRawData ['linksRows ' ][$ productId ][$ linkId ] as $ linkData ) {
1047
1052
if ($ linkData ['default_qty ' ] !== null ) {
1048
- $ skuItem = $ linkData ['sku ' ] . ImportProduct::PAIR_NAME_VALUE_SEPARATOR . $ linkData ['default_qty ' ];
1053
+ $ skuItem = $ linkData ['sku ' ] . ImportProduct::PAIR_NAME_VALUE_SEPARATOR .
1054
+ $ linkData ['default_qty ' ];
1049
1055
} else {
1050
1056
$ skuItem = $ linkData ['sku ' ];
1051
1057
}
1052
1058
$ associations [$ skuItem ] = $ linkData ['position ' ];
1053
1059
}
1054
1060
$ multiRawData ['linksRows ' ][$ productId ][$ linkId ] = [];
1055
1061
asort ($ associations );
1056
- $ dataRow [$ colPrefix . 'skus ' ] = implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , array_keys ($ associations ));
1062
+ $ dataRow [$ colPrefix . 'skus ' ] =
1063
+ implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , array_keys ($ associations ));
1057
1064
}
1058
1065
}
1059
1066
$ dataRow = $ this ->rowCustomizer ->addData ($ dataRow , $ productId );
@@ -1063,7 +1070,10 @@ protected function addMultirowData($dataRow, $multiRawData)
1063
1070
if (!empty ($ this ->collectedMultiselectsData [$ storeId ][$ productId ])) {
1064
1071
foreach (array_keys ($ this ->collectedMultiselectsData [$ storeId ][$ productId ]) as $ attrKey ) {
1065
1072
if (!empty ($ this ->collectedMultiselectsData [$ storeId ][$ productId ][$ attrKey ])) {
1066
- $ dataRow [$ attrKey ] = implode (ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR , $ this ->collectedMultiselectsData [$ storeId ][$ productId ][$ attrKey ]);
1073
+ $ dataRow [$ attrKey ] = implode (
1074
+ ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR ,
1075
+ $ this ->collectedMultiselectsData [$ storeId ][$ productId ][$ attrKey ]
1076
+ );
1067
1077
}
1068
1078
}
1069
1079
}
0 commit comments