How to change a product dropdown attribute to a multiselect in Magento
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的更多相关文章
- HTML中的attribute和property
一.概述 attribute和property是常常被弄混的两个概念. 简单来说,property则是JS代码里访问的: document.getElementByTagName('my-elemen ...
- Developing User Interfaces
Developing a User Interface with ADF Faces Purpose This tutorial covers developing the user interf ...
- System Error Codes
很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...
- 翻译《Writing Idiomatic Python》(五):类、上下文管理器、生成器
原书参考:http://www.jeffknupp.com/blog/2012/10/04/writing-idiomatic-python/ 上一篇:翻译<Writing Idiomatic ...
- Oracle Database 11g express edition
commands : show sys connect sys as sysdba or connect system as sysdba logout or disc clear screen or ...
- Magento创建configurable产品的要点
接着上一篇用API创建可配置的产品Configurable Product说事.Magento的产品类型可分为Simple Product.Group Product.Configurable Pro ...
- Magento中直接使用SQL语句
原理: magento是基于Zend Framework的,所以底层用的还是zend的zend db 在文件app/code/core/Mage/Catalog/model/Resource/Eav ...
- mac使用小技
xcodeブラックスクリーンの解決策: 1.cd ~/Library/Developer/Xcode/DerivedData 2.rm -fr * //注释:-fr和*是分开的3.关闭模拟器,关 ...
- ABP+AdminLTE+Bootstrap Table权限管理系统第九节--AdminLTE模板页搭建
AdminLTE 官网地址:https://adminlte.io/themes/AdminLTE/index2.html 首先去官网下载包下来,然后引入项目. 然后我们在web层添加区域Admin以 ...
随机推荐
- 诺基亚 Lumia 1020的价格
大部分的中国人心中,都有一个诺基亚情节.经典的1110,耐摔程度强得惊人,相信很多人都知道它的厉害. 虽说这些年诺基亚由于没有跟上Android这一波智能机的浪潮,在智能机时代被三星苹果等 ...
- 悼念512汶川大地震遇难同胞――珍惜现在,感恩生活 分类: dp 2015-05-21 10:50 14人阅读 评论(0) 收藏
Description 急!灾区的食物依然短缺! 为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并 ...
- oracle记录各登陆主机用户名,登陆ip,所执行的命令
oracle记录各登陆主机用户名,登陆ip,所执行的命令 /etc/profile #history USER_IP=`>/dev/null| awk '{print $NF}'|sed -e ...
- windows7下virtualBox配置识别usb
在windows7下安装virtualBox后.在虚拟机里面是不能识别手机的,此时我们须要做一些配置. 一. virtualBox菜单: 管理–全局设定–扩展–加入包(右側,virtualBox ex ...
- Android通过HTTP POST带參訪问asp.net网页
在看了网络上非常多视频关于android通过HTTP POST或者GET方式訪问网页并获取数据的方法. 自己也copy了一份来測试.并通过C#.NET搭建了一个简单的后台,但发现传參时,依照网上的方式 ...
- Android 4.4 Kitkat 使能 USB adb 功能
背景 在 Linux-3.8 以后,Android 的内核分支,便去掉了 f_adb,改使用 USB function FS,在用户空间实现 USB adb 功能.这篇文章依据原作者的 Google+ ...
- SNMP协议具体解释
简单网络管理协议(SNMP)是TCP/IP协议簇的一个应用层协议.在1988年被制定,并被Internet体系结构委员会(IAB)採纳作为一个短期的网络管理解决方式:因为SNMP的简单性,在Inter ...
- 逆向x64-small-trick
在逆向一些x64的代码时,会发现有一小段汇编代码理解不了,这个时候回想,要是能单独执行这一小段汇编就好了.现在我就介绍一个我的解决方法:很小汇编一段代码,但是不好理解,我就把它单独写成了一个函 ...
- JAVA Socket无参构造方法的使用
1.Socket类的构造方法很多,只有无参构造方法不会尝试建立连接,其他构造方法,都会尝试建立连接的,如果建立连接失败,将会抛出异常.如果想为Socket设定连接超时时间,此时就需要使用无参构造方法, ...
- jQuery的主要用法
一.选择网页元素jQuery的基本设计和主要用法,就是"选择某个网页元素,然后对其进行某种操作".这是它区别于其他函数库的根本特点. 使用jQuery的第一步,往往就是将一个选择表 ...