Magento中目录添加自定义属性代码
来源:互联网 发布:网络类型选择只有2g 编辑:程序博客网 时间:2024/05/22 09:01
如何给magento的产品分类创建一个自定义属性?脚本跑一遍,就在magento后台分类编辑页面的General Information组里新加了自定义属性。
更多详细内容请查看:
require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute = array(
'type' => 'int',
'label'=> 'Discount(%)',
'input' => 'text',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => "",
'group' => "General Information"
);
$installer->addAttribute('catalog_category', 'category_attribute_code ', $attribute);
//$installer->removeAttribute('catalog_category', 'category_attribute_hottest');
$installer->endSetup();
- Magento中目录添加自定义属性代码
- Magento 目录添加自定义属性例子
- magento添加添加自定义属性
- magento -- 如何为商品分类(category)添加自定义属性
- magento -- 如何为商品分类(category)添加自定义属性
- magento添加客户自定义字段
- ad目录中添加用户属性
- SEO小技巧之如何PHP中添加自定义Last-Modified 属性代码
- xib中添加自定义可编辑属性
- Magento 通过属性获取产品和目录
- Magento中添加TAB效果
- Magento分类中添加产品
- Magento 给用户customer ,添加一个属性
- magento 给customer添加属性 给order添加属性
- alfresco中添加自定义metadata属性(基本属性、切面)
- 在magento前端显示自定义属性值
- magento按Store View调用自定义属性
- magento如何添加自定义插件(模块
- 基本数据结构 java表示(未完)
- 20130602 oracle 存储过程
- 谷歌阻止苹果,谁来阻止谷歌
- java Atomic原子性
- fgetc为什么返回int
- Magento中目录添加自定义属性代码
- uBuntu root用户和user用户的切换
- Putty编译
- [JAVA VC] 短网址生成,HTTP请求,随想
- 批量修改magento产品库存数量
- C++菜鸟常见错误整理(第四天)
- SQlite 数据库选用参考
- matlab加快仿真速度
- hdoj_2045 不容易系列之(3)—— LELE的RPG难题