Goldy
Goldy

Reputation: 121

How to change manfacturer dropdown to multi select in Magento 2

I need to edit the manufacturer input type from dropdown to multiselect.How to do update this from admin?

screenshot: http://s33.postimg.org/zdhzam5wv/Capture.png

image

note: this is duplicate question of In magento how to change the Manufacturer attribute input type from dropdown to multiselect from admin but i have no idea how to do it at magento 2.

Upvotes: 0

Views: 5606

Answers (3)

th3pirat3
th3pirat3

Reputation: 575

The other 2 answers are both incomplete. So here is a combination of both

Replace YOUR_ATTRIBUTE_ID_INTEGER with your attribute_id like 355

UPDATE `eav_attribute` SET `backend_model`="Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\ArrayBackend",`backend_type`="varchar",`frontend_input`="multiselect", `source_model`=NULL WHERE `attribute_id`=YOUR_ATTRIBUTE_ID_INTEGER LIMIT 1

Upvotes: 2

Chris Carter
Chris Carter

Reputation: 21

Yes, frontend_input should be 'mulitselect' and you need to update your frontend_model to 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend' and NULL out the source_model in the 'eav_attribute' table.

Upvotes: 2

Emizen Tech
Emizen Tech

Reputation: 3591

there is no option in Magento2 to change attribute input type from dropdown to multiple select

however you can delete and create new attribute with same attribute code from admin.

or If you want to change same attribute than you need to change it directly in Database as below

: frontend_input = 'multipleselect' and backend_type = 'varchar' 

Upvotes: 2

Related Questions