eavSetupFactory = $eavSetupFactory; } public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $setup->startSetup(); $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); $eavSetup->addAttribute( Product::ENTITY, 'kai_attribute', [ 'type' => 'varchar', 'label' => 'Kai Attribute', 'input' => 'text', 'required' => false, 'visible' => true, 'user_defined' => true, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'used_in_product_listing' => true, 'apply_to' => '', 'global' => ScopedAttributeInterface::SCOPE_GLOBAL, 'group' => 'General', ] ); $setup->endSetup(); } }