Skip to content

Commit 6e12c33

Browse files
author
Yaroslav Onischenko
committed
MAGETWO-44238: Categories imported in a comma-separated format are not created properly
1 parent add2976 commit 6e12c33

File tree

1 file changed

+4
-2
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,10 +1435,12 @@ protected function _saveProducts()
14351435
}
14361436

14371437
// 3. Categories phase
1438+
if (!array_key_exists($rowSku, $this->categoriesCache)) {
1439+
$this->categoriesCache[$rowSku] = [];
1440+
}
14381441
$categoryIds = $this->processRowCategories($rowData);
1439-
$this->categoriesCache[$rowData[Product::COL_SKU]] = [];
14401442
foreach ($categoryIds as $id) {
1441-
$this->categoriesCache[$rowData[Product::COL_SKU]][$id] = true;
1443+
$this->categoriesCache[$rowSku][$id] = true;
14421444
}
14431445

14441446
// 4.1. Tier prices phase

0 commit comments

Comments
 (0)