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. :gAudit

    http://www.doc88.com/p-0794369847693.html http://baike.baidu.com/link?url=pcOUfBpILuEAPFrBSsSU-6Vzg3 ...

  2. 杭电oj 1328

    Tips:本题中没有任何难度,直接按普通逻辑进行计算即可. #include<stdio.h> #include<string.h> ]={'A','B','C','D','E ...

  3. c#中(int)、int.Parse()、int.TryParse、Convert.ToInt32的区别

    本文来自:http://blog.csdn.net/tangjunping/article/details/5443337 以前经常为这几种数据类型转换方式而迷茫,这次为了彻底搞清它们之间的区别和优缺 ...

  4. 7-05. 魔法优惠券(25) (数学 ZJU_PAT)

    题目链接:http://www.patest.cn/contests/ds/7-05 在火星上有个魔法商店,提供魔法优惠券.每一个优惠劵上印有一个整数面值K,表示若你在购买某商品时使用这张优惠劵.能够 ...

  5. UVA 489-- Hangman Judge(暴力串处理)

     Hangman Judge  In ``Hangman Judge,'' you are to write a program that judges a series of Hangman gam ...

  6. poj1220 (高精度任意进制转换)

    http://poj.org/problem?id=1220 高精度任意进制转换 代码是从discuss里找到的,据说是maigo神牛写的. 超精简!! 我自己第一写的时候,还把n进制先转成10进制, ...

  7. mysql 主从不同步处理--数据库初始化

    问题处理借鉴至网上的内容 又一次做主从,全然同步 在主库新建一张表后.在slave 段发现数据没有同步过去. mysql version:5.6.10 os :rhel 5.6 解决过程例如以下: 1 ...

  8. JQ调用后台方法

    首先,先在页面上创建一个asp按钮,添加点击事件,把要在前台调用的后台方法写在这个按钮的点击事件中: <span style="display:none;"><a ...

  9. js事件的相关收集

    1.阻止事件冒泡: IE:cancelBubble = true; 其他: stopPropagation(); 2.阻止事件的默认行为: IE: returnValue = false; 其他: p ...

  10. ChildNodes详解及其兼容性处理方式

    写在前面:在做insertBefore插入节点练习时发现一个问题,插入childNodes[0]和childNodes[1]时插入的位置是一样的!于是有了childNodes的了解,有了这篇文章,欢迎 ...