Skip to content

Commit add2976

Browse files
author
Yaroslav Onischenko
committed
Merge branch 'develop' of https://github.corp.magento.com/magento-nord/magento2ce into develop
# Conflicts: # app/code/Magento/CatalogImportExport/Model/Export/Product.php # app/code/Magento/CatalogImportExport/Model/Import/Product.php
2 parents 16cdc4c + a8134cd commit add2976

File tree

11 files changed

+394
-372
lines changed

11 files changed

+394
-372
lines changed

app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\CatalogImportExport\Model\Import\Product as ImportProductModel;
1111
use Magento\Bundle\Model\ResourceModel\Selection\Collection as SelectionCollection;
1212
use Magento\ImportExport\Controller\Adminhtml\Import;
13+
use Magento\ImportExport\Model\Import as ImportModel;
1314

1415
/**
1516
* Class RowCustomizer
@@ -215,9 +216,9 @@ protected function getFormattedBundleSelections($optionValues, SelectionCollecti
215216
'price_type' => $this->getPriceTypeValue($selection->getSelectionPriceType())
216217
];
217218
$bundleData .= $optionValues
218-
. ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
219+
. ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
219220
. implode(
220-
ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
221+
ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
221222
array_map(
222223
function ($value, $key) {
223224
return $key . ImportProductModel::PAIR_NAME_VALUE_SEPARATOR . $value;
@@ -241,9 +242,9 @@ function ($value, $key) {
241242
protected function getFormattedOptionValues($option)
242243
{
243244
return 'name' . ImportProductModel::PAIR_NAME_VALUE_SEPARATOR
244-
. $option->getTitle() . ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
245+
. $option->getTitle() . ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
245246
. 'type' . ImportProductModel::PAIR_NAME_VALUE_SEPARATOR
246-
. $option->getType() . ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
247+
. $option->getType() . ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
247248
. 'required' . ImportProductModel::PAIR_NAME_VALUE_SEPARATOR
248249
. $option->getRequired();
249250
}
@@ -291,7 +292,7 @@ protected function cleanNotBundleAdditionalAttributes($dataRow)
291292
{
292293
if (!empty($dataRow['additional_attributes'])) {
293294
$additionalAttributes = explode(
294-
ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
295+
ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
295296
$dataRow['additional_attributes']
296297
);
297298
$dataRow['additional_attributes'] = $this->getNotBundleAttributes($additionalAttributes);
@@ -315,10 +316,10 @@ protected function getNotBundleAttributes($additionalAttributes)
315316
$cleanedAdditionalAttributes .= $attributeCode
316317
. ImportProductModel::PAIR_NAME_VALUE_SEPARATOR
317318
. $attributeValue
318-
. ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR;
319+
. ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR;
319320
}
320321
}
321322

322-
return rtrim($cleanedAdditionalAttributes, ImportProductModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR);
323+
return rtrim($cleanedAdditionalAttributes, ImportModel::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR);
323324
}
324325
}

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\CatalogImportExport\Model\Export;
77

8+
use Magento\ImportExport\Model\Import;
89
use \Magento\Store\Model\Store;
910
use \Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
1011

@@ -638,7 +639,7 @@ protected function updateDataWithCategoryColumns(&$dataRow, &$rowCategories, $pr
638639
}
639640
$categories[] = $categoryPath;
640641
}
641-
$dataRow[self::COL_CATEGORY] = implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $categories);
642+
$dataRow[self::COL_CATEGORY] = implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $categories);
642643
unset($rowCategories[$productId]);
643644

644645
return true;
@@ -901,7 +902,7 @@ protected function collectRawData()
901902

902903
if (!empty($additionalAttributes)) {
903904
$data[$itemId][$storeId][self::COL_ADDITIONAL_ATTRIBUTES] =
904-
implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalAttributes);
905+
implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalAttributes);
905906
} else {
906907
unset($data[$itemId][$storeId][self::COL_ADDITIONAL_ATTRIBUTES]);
907908
}
@@ -981,7 +982,7 @@ protected function hasMultiselectData($item, $storeId)
981982
protected function collectMultiselectValues($item, $attrCode, $storeId)
982983
{
983984
$attrValue = $item->getData($attrCode);
984-
$optionIds = explode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $attrValue);
985+
$optionIds = explode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $attrValue);
985986
$options = array_intersect_key(
986987
$this->_attributeValues[$attrCode],
987988
array_flip($optionIds)
@@ -1041,7 +1042,7 @@ protected function addMultirowData($dataRow, $multiRawData)
10411042
$websiteCodes[] = $this->_websiteIdToCode[$productWebsite];
10421043
}
10431044
$dataRow[self::COL_PRODUCT_WEBSITES] =
1044-
implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $websiteCodes);
1045+
implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $websiteCodes);
10451046
$multiRawData['rowWebsites'][$productId] = [];
10461047
}
10471048
if (!empty($multiRawData['mediaGalery'][$productId])) {
@@ -1057,11 +1058,11 @@ protected function addMultirowData($dataRow, $multiRawData)
10571058
}
10581059
}
10591060
$dataRow['additional_images'] =
1060-
implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImages);
1061+
implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImages);
10611062
$dataRow['additional_image_labels'] =
1062-
implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImageLabels);
1063+
implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImageLabels);
10631064
$dataRow['hide_from_product_page'] =
1064-
implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImageIsDisabled);
1065+
implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImageIsDisabled);
10651066
$multiRawData['mediaGalery'][$productId] = [];
10661067
}
10671068
foreach ($this->_linkTypeProvider->getLinkTypes() as $linkTypeName => $linkId) {
@@ -1081,7 +1082,7 @@ protected function addMultirowData($dataRow, $multiRawData)
10811082
$multiRawData['linksRows'][$productId][$linkId] = [];
10821083
asort($associations);
10831084
$dataRow[$colPrefix . 'skus'] =
1084-
implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, array_keys($associations));
1085+
implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, array_keys($associations));
10851086
}
10861087
}
10871088
$dataRow = $this->rowCustomizer->addData($dataRow, $productId);
@@ -1092,7 +1093,7 @@ protected function addMultirowData($dataRow, $multiRawData)
10921093
foreach (array_keys($this->collectedMultiselectsData[$storeId][$productId]) as $attrKey) {
10931094
if (!empty($this->collectedMultiselectsData[$storeId][$productId][$attrKey])) {
10941095
$dataRow[$attrKey] = implode(
1095-
ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
1096+
Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
10961097
$this->collectedMultiselectsData[$storeId][$productId][$attrKey]
10971098
);
10981099
}
@@ -1168,7 +1169,7 @@ protected function optionRowToCellString($option)
11681169
$result[] = $key . ImportProduct::PAIR_NAME_VALUE_SEPARATOR . $value;
11691170
}
11701171

1171-
return implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $result);
1172+
return implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $result);
11721173
}
11731174

11741175
/**

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface;
1414
use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor;
1515
use Magento\Framework\Stdlib\DateTime;
16+
use Magento\ImportExport\Model\Import;
1617
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError;
1718
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
1819

@@ -36,11 +37,6 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
3637
*/
3738
const ATTRIBUTE_DELETE_BUNCH = 1000;
3839

39-
/**
40-
* default delimiter for several values in one cell
41-
*/
42-
const DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR = ',';
43-
4440
/**
4541
* Pseudo multi line separator in one cell.
4642
*
@@ -716,10 +712,10 @@ public function isAttributeValid($attrCode, array $attrParams, array $rowData, $
716712
*/
717713
public function getMultipleValueSeparator()
718714
{
719-
if (!empty($this->_parameters[\Magento\ImportExport\Model\Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR])) {
720-
return $this->_parameters[\Magento\ImportExport\Model\Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR];
715+
if (!empty($this->_parameters[Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR])) {
716+
return $this->_parameters[Import::FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR];
721717
}
722-
return self::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR;
718+
return Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR;
723719
}
724720

725721
/**
@@ -782,7 +778,7 @@ public function deleteProductsForReplacement()
782778
{
783779
$this->setParameters(array_merge(
784780
$this->getParameters(),
785-
['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE]
781+
['behavior' => Import::BEHAVIOR_DELETE]
786782
));
787783
$this->_deleteProducts();
788784

@@ -839,9 +835,9 @@ protected function _deleteProducts()
839835
protected function _importData()
840836
{
841837
$this->_validatedRows = null;
842-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_DELETE == $this->getBehavior()) {
838+
if (Import::BEHAVIOR_DELETE == $this->getBehavior()) {
843839
$this->_deleteProducts();
844-
} elseif (\Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE == $this->getBehavior()) {
840+
} elseif (Import::BEHAVIOR_REPLACE == $this->getBehavior()) {
845841
$this->_replaceFlag = true;
846842
$this->_replaceProducts();
847843
} else {
@@ -863,7 +859,7 @@ protected function _replaceProducts()
863859
$this->_validatedRows = null;
864860
$this->setParameters(array_merge(
865861
$this->getParameters(),
866-
['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND]
862+
['behavior' => Import::BEHAVIOR_APPEND]
867863
));
868864
$this->_saveProductsData();
869865

@@ -980,7 +976,7 @@ protected function _prepareRowForDb(array $rowData)
980976

981977
static $lastSku = null;
982978

983-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_DELETE == $this->getBehavior()) {
979+
if (Import::BEHAVIOR_DELETE == $this->getBehavior()) {
984980
return $rowData;
985981
}
986982

@@ -1097,7 +1093,7 @@ protected function _saveLinks()
10971093
}
10981094
}
10991095
}
1100-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND != $this->getBehavior() && $productIds) {
1096+
if (Import::BEHAVIOR_APPEND != $this->getBehavior() && $productIds) {
11011097
$this->_connection->delete(
11021098
$mainTable,
11031099
$this->_connection->quoteInto('product_id IN (?)', array_unique($productIds))
@@ -1191,7 +1187,7 @@ protected function _saveProductCategories(array $categoriesData)
11911187
$categoriesIn[] = ['product_id' => $productId, 'category_id' => $categoryId, 'position' => 1];
11921188
}
11931189
}
1194-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND != $this->getBehavior()) {
1190+
if (Import::BEHAVIOR_APPEND != $this->getBehavior()) {
11951191
$this->_connection->delete(
11961192
$tableName,
11971193
$this->_connection->quoteInto('product_id IN (?)', $delProductId)
@@ -1543,7 +1539,7 @@ protected function _saveProducts()
15431539
$this->taxClassProcessor->upsertTaxClass($rowData['tax_class_name'], $productTypeModel);
15441540
}
15451541

1546-
if ($this->getBehavior() == \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND ||
1542+
if ($this->getBehavior() == Import::BEHAVIOR_APPEND ||
15471543
empty($rowData[self::COL_SKU])
15481544
) {
15491545
$rowData = $productTypeModel->clearEmptyData($rowData);
@@ -1693,7 +1689,7 @@ protected function _saveProductTierPrices(array $tierPriceData)
16931689
$tierPriceIn[] = $row;
16941690
}
16951691
}
1696-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND != $this->getBehavior()) {
1692+
if (Import::BEHAVIOR_APPEND != $this->getBehavior()) {
16971693
$this->_connection->delete(
16981694
$tableName,
16991695
$this->_connection->quoteInto('entity_id IN (?)', $delProductId)
@@ -1724,8 +1720,8 @@ protected function _getUploader()
17241720

17251721
$DS = DIRECTORY_SEPARATOR;
17261722

1727-
if (!empty($this->_parameters[\Magento\ImportExport\Model\Import::FIELD_NAME_IMG_FILE_DIR])) {
1728-
$tmpPath = $this->_parameters[\Magento\ImportExport\Model\Import::FIELD_NAME_IMG_FILE_DIR];
1723+
if (!empty($this->_parameters[Import::FIELD_NAME_IMG_FILE_DIR])) {
1724+
$tmpPath = $this->_parameters[Import::FIELD_NAME_IMG_FILE_DIR];
17291725
} else {
17301726
$tmpPath = $dirAddon . $DS . $this->_mediaDirectory->getRelativePath('import');
17311727
}
@@ -1807,7 +1803,7 @@ protected function _saveMediaGallery(array $mediaGalleryData)
18071803
$productId = $this->skuProcessor->getNewSku($productSku)['entity_id'];
18081804
$productIds[] = $productId;
18091805
$insertedGalleryImgs = [];
1810-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND != $this->getBehavior()) {
1806+
if (Import::BEHAVIOR_APPEND != $this->getBehavior()) {
18111807
$this->_connection->delete(
18121808
$mediaGalleryTableName,
18131809
$this->_connection->quoteInto('entity_id IN (?)', $productId)
@@ -1908,7 +1904,7 @@ protected function _saveProductWebsites(array $websiteData)
19081904
$websitesData[] = ['product_id' => $productId, 'website_id' => $websiteId];
19091905
}
19101906
}
1911-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND != $this->getBehavior()) {
1907+
if (Import::BEHAVIOR_APPEND != $this->getBehavior()) {
19121908
$this->_connection->delete(
19131909
$tableName,
19141910
$this->_connection->quoteInto('product_id IN (?)', $delProductId)
@@ -2113,7 +2109,7 @@ public function validateRow(array $rowData, $rowNum)
21132109
$rowScope = $this->getRowScope($rowData);
21142110

21152111
// BEHAVIOR_DELETE use specific validation logic
2116-
if (\Magento\ImportExport\Model\Import::BEHAVIOR_DELETE == $this->getBehavior()) {
2112+
if (Import::BEHAVIOR_DELETE == $this->getBehavior()) {
21172113
if (self::SCOPE_DEFAULT == $rowScope && !isset($this->_oldSku[$rowData[self::COL_SKU]])) {
21182114
$this->addRowError(ValidatorInterface::ERROR_SKU_NOT_FOUND_FOR_DELETE, $rowNum);
21192115
return false;

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Magento\CatalogImportExport\Model\Import\Product;
99
use Magento\Framework\App\Filesystem\DirectoryList;
1010
use Magento\Framework\Stdlib\DateTime;
11+
use Magento\ImportExport\Model\Import;
1112

1213
/**
1314
* Class ProductTest
@@ -567,7 +568,7 @@ public function testGetMultipleValueSeparatorDefault()
567568
{
568569
$this->setPropertyValue($this->importProduct, '_parameters', null);
569570
$this->assertEquals(
570-
\Magento\CatalogImportExport\Model\Import\Product::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
571+
Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR,
571572
$this->importProduct->getMultipleValueSeparator()
572573
);
573574
}

app/code/Magento/ConfigurableImportExport/Model/Export/RowCustomizer.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\CatalogImportExport\Model\Export\RowCustomizerInterface;
99
use \Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
10+
use Magento\ImportExport\Model\Import;
1011

1112
class RowCustomizer implements RowCustomizerInterface
1213
{
@@ -52,11 +53,11 @@ public function prepareData($collection, $productIds)
5253

5354
foreach ($variations as $sku => $values) {
5455
$variations[$sku] =
55-
'sku=' . $sku . ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
56-
. implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $values);
56+
'sku=' . $sku . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
57+
. implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $values);
5758
}
5859
$variations = implode(ImportProduct::PSEUDO_MULTI_LINE_SEPARATOR, $variations);
59-
$variationsLabels = implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $variationsLabels);
60+
$variationsLabels = implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $variationsLabels);
6061

6162
$this->configurableData[$product->getId()] = [
6263
'configurable_variations' => $variations,

app/code/Magento/ConfigurableImportExport/Test/Unit/Model/Export/RowCustomizerTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\ConfigurableImportExport\Test\Unit\Model\Export;
88

99
use \Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
10+
use Magento\ImportExport\Model\Import;
1011

1112
class RowCustomizerTest extends \PHPUnit_Framework_TestCase
1213
{
@@ -256,17 +257,17 @@ protected function getExpectedConfigurableData()
256257
return [
257258
$this->initiatedProductId => [
258259
'configurable_variations' => implode(ImportProduct::PSEUDO_MULTI_LINE_SEPARATOR, [
259-
'_sku_' => 'sku=_sku_' . ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
260-
. implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, [
260+
'_sku_' => 'sku=_sku_' . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
261+
. implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, [
261262
'code_of_attribute=Option Title',
262263
'code_of_attribute=Option Title',
263264
]),
264-
'_sku_2' => 'sku=_sku_2' . ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
265-
. implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, [
265+
'_sku_2' => 'sku=_sku_2' . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
266+
. implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, [
266267
'code_of_attribute_2=Option Title 2',
267268
])
268269
]),
269-
'configurable_variation_labels' => implode(ImportProduct::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, [
270+
'configurable_variation_labels' => implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, [
270271
'code_of_attribute' => 'code_of_attribute=Super attribute label',
271272
'code_of_attribute_2' => 'code_of_attribute_2=Super attribute label 2',
272273
]),
@@ -291,6 +292,7 @@ protected function setPropertyValue(&$object, $property, $value)
291292
/**
292293
* @param $object
293294
* @param $property
295+
* @return mixed
294296
*/
295297
protected function getPropertyValue(&$object, $property)
296298
{

app/code/Magento/GroupedImportExport/Model/Import/Product/Type/Grouped.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Magento\GroupedImportExport\Model\Import\Product\Type;
99

1010
use Magento\CatalogImportExport\Model\Import\Product;
11+
use Magento\ImportExport\Model\Import;
1112

1213
class Grouped extends \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType
1314
{
@@ -76,7 +77,7 @@ public function saveData()
7677
if (!$this->_entityModel->isRowAllowedToImport($rowData, $rowNum) || empty($associatedSkusQty)) {
7778
continue;
7879
}
79-
$associatedSkusAndQtyPairs = explode(Product::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $associatedSkusQty);
80+
$associatedSkusAndQtyPairs = explode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $associatedSkusQty);
8081
$position = 0;
8182
foreach ($associatedSkusAndQtyPairs as $associatedSkuAndQty) {
8283
++$position;

0 commit comments

Comments
 (0)