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以 ...
随机推荐
- hibernate中save,update,saveorupdate
save在添加用的时候 不会出现索引机制(即遍历目录 效率最高)update在修改时候要遍历 不存在则会异常saveorupdate是优先遍历 如果不存在则创建(效率最低)
- MEMS开关
MEMS器件在射频比如无线通信上有很好的应用.RF MEMS谐振器和诱导器品质因子在微波上有大幅度提高.MEMS开关极大地改进了高频性能和降低了能耗.本篇概要介绍MEMS开关. 自从1979年彼特森( ...
- Cacti 是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具
Cacti 是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具. mysqlreport是mysql性能监测时最常用的工具,对了解mysql运行状态和配置调整都有很大 ...
- psacct监视用户执行的命令,如cpu时间和内存战胜,实时进程记账
psacct监视用户执行的命令,如cpu时间和内存战胜,实时进程记账
- OpenLayers实现覆盖物选择信息提示
var map; function init() { map = new OpenLayers.Map("map",{projection:"EPSG:3857" ...
- hdu 4619 Warm up 2_最大独立集
三个人整个下午都想不出这题 后来看题解,竟然用匈牙利算法的最大独立集,我顿时晕了. 题意:给竖着和横着的方块,除去重叠的,最多能留下几个方块 #include <cstdlib> #inc ...
- Windows查看电脑上安装的.Net Framework版本的五种方法(转)
1.查看安装文件判断Framwork版本号 打开资源管理器,比如我的电脑,再地址栏输入%systemroot%\Microsoft.NET\Framework后单击“转到”或者按回车. 在新文件夹中查 ...
- 12款令程序员惊叹的CSS3效果库
最新的CSS3都配备了新的特性,来设计创建动画和互动的网页.在本文中,可以找到一些非常优秀的CSS3效果库,来让你的Web设计看起来更加引人注目.还在等什么?让我们一起看起来吧! Animate.cs ...
- windows下使用vnc viewer远程连接Linux桌面(转)
在windows下使用vnc viewer远程连接Linux桌面,主要配置步骤: Linux: 1.rpm -qa vnc //查看是否安装vnc服务,如果没有安装,可以使用yum,或者rpm进行安装 ...
- 利用sql里的xpath生成表格
SELECT (SELECT * from Common.Common_Setup_CityData FOR XML PATH('tr'), TYPE).query(' for $item ...