From 53a34562ae6aeab152cee9c9ac240bcb7259c2ff 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 a5aefff656bd3..c8bff8a3bf462 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php @@ -114,6 +114,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($this->unquoteDelimiter($name)); From 543fce4f671377309d68bc0132c33a0000342493 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 c8bff8a3bf462..ffa0d4aff874b 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()