摘要: $customer = Mage::getSingleton('customer/session')->getCustomer(); $customer->setData( 'group_id', '2'); $customer->save(); 同理,你也可以修改用户的其它信息 [Magento 阅读全文
posted @ 2017-03-23 17:56 ec04 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 场景1:所有的资源权限被设置为管理角色 步骤1:获取当前的管理角色详细信息 SELECT * FROM admin_role WHERE role_name = 'Administrators' /*Administrators - is Your admin role name*/ 步骤2:删除管 阅读全文
posted @ 2017-03-23 17:04 ec04 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 有时为了调试magento,需要获取当前的查询sql语句,在magento中获取SQL语句,这里我们通过$collection->getSelectSql(true)来调试sql 1 $collection=Mage::getResourceModel('reports/product_collec 阅读全文
posted @ 2017-03-23 17:00 ec04 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 步骤 I. 加一个occupation/title字段到用户注册页,差不多在register.html的54行,在email下方加一个Occupation显示代码 <!--[if !supportLineBreakNewLine]--><!--[endif]--> 代码: <li><div clas 阅读全文
posted @ 2017-03-23 16:57 ec04 阅读(150) 评论(0) 推荐(0) 编辑