Skip to content

Commit 323f697

Browse files
committed
MAGETWO-44106: New created category should be anchor by default
1 parent 0be91a5 commit 323f697

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
139139
'Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection'
140140
);
141141
}
142+
143+
if (version_compare($context->getVersion(), '2.0.3') < 0) {
144+
/** @var \Magento\Catalog\Setup\CategorySetup $categorySetup */
145+
$categorySetup = $this->categorySetupFactory->create(['setup' => $setup]);
146+
$categorySetup->updateAttribute(3, 51, 'default_value', 1);
147+
}
142148
$setup->endSetup();
143149
}
144150
}

app/code/Magento/Catalog/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Catalog" setup_version="2.0.2">
9+
<module name="Magento_Catalog" setup_version="2.0.3">
1010
<sequence>
1111
<module name="Magento_Eav"/>
1212
<module name="Magento_Cms"/>

0 commit comments

Comments
 (0)