Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public function __construct(
}

/**
* Initialize categories to be processed
*
* @return $this
*/
protected function initCategories()
Expand Down Expand Up @@ -112,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($name);
Expand Down