From e2f89c8543ca3461538f36cfb0f428ef9d502f66 Mon Sep 17 00:00:00 2001 From: utietze Date: Wed, 26 Sep 2018 19:59:54 +0200 Subject: [PATCH 1/2] Update CategoryProcessor.php --- .../Model/Import/Product/CategoryProcessor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php index 54fdecbaaf967..6ed6add15c9dc 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php @@ -112,6 +112,9 @@ protected function createCategory($name, $parentId) if (!($parentCategory = $this->getCategoryById($parentId))) { $parentCategory = $this->categoryFactory->create()->load($parentId); } + + // Set StoreId to 0 to generate URL Keys global and prevent generating url rewrites just for default website + $category->setStoreId(0); $category->setPath($parentCategory->getPath()); $category->setParentId($parentId); $category->setName($name); From 4ad4849565650f1ddf77164b901afb42adbfa571 Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Tue, 2 Oct 2018 13:27:17 -0500 Subject: [PATCH 2/2] Fixed static test --- .../Model/Import/Product/CategoryProcessor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php index 6ed6add15c9dc..375fb00b5eae9 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php @@ -66,6 +66,8 @@ public function __construct( } /** + * Initialize categories to be processed + * * @return $this */ protected function initCategories()