禁用Magento中的客户 [英] Disable customer in Magento

查看:64
本文介绍了禁用Magento中的客户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向管理员提供禁用登录帐户的选项,不会从该帐户中删除任何数据,但是如果不使用它的用户被禁用,则一经清除,该用户将不会注意到任何新闻通讯或其他任何内容否则,最后一封邮件会通知您停用帐户.

I want to include to the administrator the option to disable login accounts, no data would be erased from the account, but if would be disabled for users not using it more, once cleared, the user would not notice any newsletters or anything else, just one last mail notifying the deactivating your account.

推荐答案

这很有趣.我之前已经研究过此内容,并且客户数据库记录上有一个is_active标志,但是核心Magento代码无法在任何地方访问或写入该标志.为了达到此要求,您需要覆盖 Mage_Customer_AccountController来检查loginPostAction()中此字段的值,然后在adminhtml Customer块中使该字段可见.

This is an interesting one. I've looked into this previously, and there is an is_active flag on the customer database record, but it is not accessed or written anywhere by the core Magento code. In order to achieve this requirement, you'll need to override the Mage_Customer_AccountController to check the value of this field inside loginPostAction() and then to make that field visible within the adminhtml Customer blocks.

我对实现该代码有些紧张,因为这让我感到Varien会包含该领域,但根本不使用它.我会对其他人对此的想法感兴趣.

I'm a little nervous about implementing that code as it bothers me that Varien would include the field but not utilise it at all. I'd be interested in others' thoughts about this.

HTH, 京东

这篇关于禁用Magento中的客户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆