First, update the attribute input type to multiselect:

UPDATE eav_attribute SET
entity_type_id = '',
attribute_model = NULL,
backend_model = 'eav/entity_attribute_backend_array',
backend_type = 'varchar',
backend_table = NULL,
frontend_model = NULL,
frontend_input = 'multiselect',
frontend_class = NULL
WHERE attribute_id = 'YOUR_ATTRIBUTE_ID_HERE';

Next, copy the attribute values from the old table to the new:

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_HERE;

Finally,  remove the old values or they will conflict with the new setup (the old values will load, but Magento will save new values to the varchar table):

DELETE FROM catalog_product_entity_int
WHERE entity_type_id = 4 and attribute_id = YOUR_ATTRIBUTE_ID_HERE;

How to change a product dropdown attribute to a multiselect in Magento的更多相关文章

  1. HTML中的attribute和property

    一.概述 attribute和property是常常被弄混的两个概念. 简单来说,property则是JS代码里访问的: document.getElementByTagName('my-elemen ...

  2. Developing User Interfaces

      Developing a User Interface with ADF Faces Purpose This tutorial covers developing the user interf ...

  3. System Error Codes

    很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...

  4. 翻译《Writing Idiomatic Python》(五):类、上下文管理器、生成器

    原书参考:http://www.jeffknupp.com/blog/2012/10/04/writing-idiomatic-python/ 上一篇:翻译<Writing Idiomatic ...

  5. Oracle Database 11g express edition

    commands : show sys connect sys as sysdba or connect system as sysdba logout or disc clear screen or ...

  6. Magento创建configurable产品的要点

    接着上一篇用API创建可配置的产品Configurable Product说事.Magento的产品类型可分为Simple Product.Group Product.Configurable Pro ...

  7. Magento中直接使用SQL语句

    原理: magento是基于Zend Framework的,所以底层用的还是zend的zend db 在文件app/code/core/Mage/Catalog/model/Resource/Eav ...

  8. mac使用小技

    xcodeブラックスクリーンの解決策: 1.cd ~/Library/Developer/Xcode/DerivedData 2.rm -fr *    //注释:-fr和*是分开的3.关闭模拟器,关 ...

  9. ABP+AdminLTE+Bootstrap Table权限管理系统第九节--AdminLTE模板页搭建

    AdminLTE 官网地址:https://adminlte.io/themes/AdminLTE/index2.html 首先去官网下载包下来,然后引入项目. 然后我们在web层添加区域Admin以 ...

随机推荐

  1. 关于KeyEvent.Callback

    keycode------------>KEYCODE_BACK,KEYCODE_MENU event.getAction------->ACTION_DOWN,ACTION_UP,ACT ...

  2. javascript闭包特性

    http://www.cnblogs.com/rubylouvre/archive/2009/07/24/1530074.html var name = "The Window"; ...

  3. VC内存溢出一例 –- 调用约定不一致 (_CRT_DEBUGGER_HOOK(_CRT_DEBUGGER_GSFAILURE)

    VC (_CRT_DEBUGGER_HOOK(_CRT_DEBUGGER_GSFAILURE) 问题记录 VC内存溢出一例 –- 调用约定不一致 (_CRT_DEBUGGER_HOOK(_CRT_DE ...

  4. 【Xamarin 挖墙脚系列:Xamarin SDK开源了................】

                                                                  在前不久举行的 Build 2016 开发者大会上,微软宣布它收购的 Xam ...

  5. Java webservice

    webservice:     就是应用程序之间跨语言的调用    1.xml    2.    wsdl: webservice description language web服务描述语言     ...

  6. NSDictionary所有API的学习。

    <欢迎大家增加iOS开发学习交流群:QQ529560119> @property (readonly)NSUInteger count; //1.利用指定的key寻找相应的value - ...

  7. linux遇见的问题

    我在/usr 文件夹下把hadoop-1.2.1文件夹改名为hadoop,不过hadoop已经存在了.这样就覆盖了.可是课件被占用了,可见没有真的删除掉. 怎么把消失的hadoop真正删除呢?

  8. java工厂类与反射机制

    java 简单工厂类 2012-04-22 15:44:07|  分类: java |  标签:java工厂类  简单工厂类  |举报|字号 订阅     简单工厂模式需要由以下角色组成: 接口    ...

  9. c# 集合的交集、并集、差集

    , , , , }; , , , , , }; var jiaoJi = oldArray.Intersect(newArray).ToList();//2,4,5 var oldChaJi = ol ...

  10. 在一个RAC集群中最多支持多少节点

    How many nodes can one have in an HP-UX/Solaris/AIX/Windows/Linux cluster? Technically and since Ora ...