Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mcjwsk/3c551160138cfedd624ee0e016ba1189 to your computer and use it in GitHub Desktop.
Save mcjwsk/3c551160138cfedd624ee0e016ba1189 to your computer and use it in GitHub Desktop.
Magento change dropdown attribute to multiselect
UPDATE eav_attribute SET
entity_type_id = 4,
attribute_model = NULL,
backend_model = 'eav/entity_attribute_backend_array',
backend_type = 'varchar',
backend_table = NULL,
source_model = NULL,
frontend_model = NULL,
frontend_input = 'multiselect',
frontend_class = NULL
WHERE attribute_id = YOUR_ATTRIBUTE_ID;
INSERT INTO catalog_product_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value)
SELECT entity_type_id, attribute_id, store_id, entity_id, value
FROM catalog_product_entity_int
WHERE attribute_id = YOUR_ATTRIBUTE_ID;
DELETE FROM catalog_product_entity_int WHERE entity_type_id = 4 and attribute_id = YOUR_ATTRIBUTE_ID;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment