In my InstallData class I have the following code, it perfectly creates the attribute for me but this creates it as Dropdown and I need it to be Swatch Text.
What option am I missing?
$productTypes = [
\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE,
\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL,
\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE,
\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE,
];
$productTypes = join(',', $productTypes);
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'web_volumen',
[
'type' => 'int',
'group' => 'Module',
'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
'label' => 'VOLUMEN',
'input' => 'select',
'class' => '',
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => '',
'searchable' => true,
'filterable' => true,
'comparable' => false,
'visible_on_front' => true,
'used_in_product_listing' => true,
'apply_to' => $productTypes,
]
);