magento 添加会员注册字段
来源:互联网 发布:鼎捷软件股份有限公司 编辑:程序博客网 时间:2024/04/30 02:55
以magento1.9.3作为例子
添加以下代码到magento根目录,运行.
<?phpdefine('MAGENTO', realpath(dirname(__FILE__)));ini_set('memory_limit', '32M');set_time_limit (0);require_once MAGENTO . '/app/Mage.php';Mage::app();$setup = new Mage_Eav_Model_Entity_Setup('core_setup');$setup->startSetup();$entityTypeId = $setup->getEntityTypeId('customer');$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);$setup->addAttribute('customer', 'mobile', array( 'input' => 'text', 'type' => 'text', 'label' => 'Mobile', 'visible' => 1, 'required' => 1, 'user_defined' => 1,));$setup->addAttributeToGroup( $entityTypeId, $attributeSetId, $attributeGroupId, 'mobile', '999' //sort_order);$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'mobile');$oAttribute->setData('used_in_forms', array('adminhtml_customer'));$oAttribute->save();$re = $setup->endSetup();var_dump($re);
0 0
- magento 添加会员注册字段
- magento -- 增加会员信息字段
- phpwind 会员添加字段操作过程
- 为Magento1.5新增会员注册字段
- 为Magento1.5新增会员注册字段
- 织梦(dede)注册会员时增加字段
- 织梦(dede)注册会员时增加字段
- 织梦(dede)注册会员时增加字段
- 织梦(dede)注册会员时增加字段
- 织梦(dede)注册会员时增加字段
- magento添加客户自定义字段
- 织梦后台 添加注册会员
- ecshop 注册添加字段
- 会员注册
- Magento - Contact Form 添加自定义字段
- Magento后台表单字段添加备注
- magento product 添加新的字段
- magento把产品价格隐藏起来,只让注册的会员看到产品价格
- PAT 乙等 1017 C语言
- Android NDK使用示例说明
- C/C++学习(7)strcpy函数与while循环
- Python 3基础教程6-for循环语句
- 文章标题js时间戳转时间
- magento 添加会员注册字段
- 错误:Gradle sync failed: Could not find method android() for arguments [build_6d4hiu27bgm2ho4bez6d80wx
- c语言练习
- 类 String理解和经典面试题,
- eclipse 配置tomcat8 报错:The Apache Tomcat installation at this directory is version 8.5.14. A Tomcat 8
- Java Web 常用Maven 依赖
- 基于tensorflow的MNIST数字识别
- openCV利用航拍相机从底部向上扫描物体拼接全景图
- 目前的感悟