Skip to content

Commit 20807f1

Browse files
Leonid Poluyanovisitnikov
authored andcommitted
MAGETWO-50224: Inconsistent data during installation of Store
1 parent 6e1a0ec commit 20807f1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/code/Magento/Catalog/Setup/InstallData.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class InstallData implements InstallDataInterface
2727
*
2828
* @var int
2929
*/
30-
private $rootCategoryId = 1;
30+
const ROOT_CATEGORY_ID = 1;
3131

3232
/**
3333
* Default category ID
@@ -60,10 +60,10 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
6060
$categorySetup->installEntities();
6161
// Create Root Catalog Node
6262
$categorySetup->createCategory()
63-
->load($this->rootCategoryId)
64-
->setId($this->rootCategoryId)
63+
->load(self::ROOT_CATEGORY_ID)
64+
->setId(self::ROOT_CATEGORY_ID)
6565
->setStoreId(0)
66-
->setPath($this->rootCategoryId)
66+
->setPath(self::ROOT_CATEGORY_ID)
6767
->setLevel(0)
6868
->setPosition(0)
6969
->setChildrenCount(0)
@@ -76,7 +76,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
7676
$category->load(self::DEFAULT_CATEGORY_ID)
7777
->setId(self::DEFAULT_CATEGORY_ID)
7878
->setStoreId(0)
79-
->setPath($this->rootCategoryId . '/' . self::DEFAULT_CATEGORY_ID)
79+
->setPath(self::ROOT_CATEGORY_ID . '/' . self::DEFAULT_CATEGORY_ID)
8080
->setName('Default Category')
8181
->setDisplayMode('PRODUCTS')
8282
->setIsActive(1)

0 commit comments

Comments
 (0)