Skip to content

Commit 71e138e

Browse files
ENGCOM-3175: [Backport] Update CategoryProcessor.php #18563
2 parents 6fb64b1 + 41d4434 commit 71e138e

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()
@@ -112,6 +114,9 @@ protected function createCategory($name, $parentId)
112114
if (!($parentCategory = $this->getCategoryById($parentId))) {
113115
$parentCategory = $this->categoryFactory->create()->load($parentId);
114116
}
117+
118+
// Set StoreId to 0 to generate URL Keys global and prevent generating url rewrites just for default website
119+
$category->setStoreId(0);
115120
$category->setPath($parentCategory->getPath());
116121
$category->setParentId($parentId);
117122
$category->setName($name);

0 commit comments

Comments
 (0)