1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
/** @var EavSetup $eavSetup */ $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); /** * Add attributes to the eav/attribute */ $eavSetup->addAttribute( \Magento\Catalog\Model\Category::ENTITY, 'external_link', [ 'group' => 'General', 'type' => 'varchar', 'label' => 'External Link', 'input' => 'text', 'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => true, 'default' => '', ] ); |
Magento2 : Create Category attribute
Share This Story, Choose Your Platform!
One Comment
Comments are closed.
How do you implement this?