Skip to content

Commit 547e2a3

Browse files
author
Stanislav Idolov
authored
ENGCOM-3083: Update CategoryProcessor.php #18271
2 parents 6444c28 + 276bfc3 commit 547e2a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public function __construct(
6666
}
6767

6868
/**
69+
* Initialize categories to be processed
70+
*
6971
* @return $this
7072
*/
7173
protected function initCategories()
@@ -114,6 +116,9 @@ protected function createCategory($name, $parentId)
114116
if (!($parentCategory = $this->getCategoryById($parentId))) {
115117
$parentCategory = $this->categoryFactory->create()->load($parentId);
116118
}
119+
120+
// Set StoreId to 0 to generate URL Keys global and prevent generating url rewrites just for default website
121+
$category->setStoreId(0);
117122
$category->setPath($parentCategory->getPath());
118123
$category->setParentId($parentId);
119124
$category->setName($this->unquoteDelimiter($name));

0 commit comments

Comments
 (0)