开发者

Allot customer group according to their email id

开发者 https://www.devze.com 2023-01-31 04:26 出处:网络
In a magento project I need to allot customer group to customer according to their email id. Like I have customer group in admin \"xxx\" and \"yyy\"

In a magento project I need to allot customer group to customer according to their email id. Like I have customer group in admin "xxx" and "yyy" NOw I want at time of signup if user have id abc@xxx.com, group named xxx allot to him or if he has abc@yyy.in, group "yyy" allot to him开发者_如何学编程.

Please suggest me ..how can I accomplish this task or please refer any document.

Thanks!


The most likely way to succeed is to override Mage_Customer_Model_Customer and provide your own getGroupId() method. This method should check the domain of the email address ($this->getEmail()) and then both set and return the ID of the group. If it doesn't recognise the domain then pass it back to the parent to be processed as normal.

0

精彩评论

暂无评论...
验证码 换一张
取 消