문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top