0

Previous developers created attribute with attribute code : is_outlet_available .

enter image description here

Now we need Multiple Select option for that attribute. But the Multiple Select option is not visible now. Is there any way we can select Multiple Select option for that attribute instead of creating new attribute?

1 Answer 1

1

You can use Setup/Patch to update the attribute input and type. Note: Multiple select require backend_type: varchar.

Update: change the backend type, You migh have to migrate the option value of that attribute.

Sample:

$eavSetup->updateAttribute('catalog_product','is_outlet_available', 'input', 'multiselect');
$eavSetup->updateAttribute('catalog_product', 'is_outlet_available', 'backend_type', 'varchar');
$eavSetup->updateAttribute('catalog_product', 'is_outlet_available', 'backend', \Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend::class);

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.