Forked from dinhkhanh/change-dropdown-attribute-to-multiselect.sql
Last active
March 29, 2017 12:01
-
-
Save mcjwsk/3c551160138cfedd624ee0e016ba1189 to your computer and use it in GitHub Desktop.
Magento change dropdown attribute to multiselect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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