Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Which File Assigns Default Customer Group
 
zep007
Sr. Member
 
Avatar
Total Posts:  131
Joined:  2008-05-15
Connecticut
 

Magento community,

I have a almost-live version of Magento 1.1.8 and I need to get the price rules working properly.  Ive noticed the “default” customer group that is assigned when a customer first creates an account is the group being applied to not logged in customers, but other customer groups besides the default group are working nicely.

I want to auto assign the customer group when someone creates an account, but I cannot use the backend to do so, because that group is applied to not logged in customers.

So I wanted to know which file I need to modify in order to hard code the group a customer is assigned to when they first create an account, while keeping the default group configuration in the backend assigned to a different group.

I would really appreciate some help on this one, I cant figure it out searching the forums or the Custom Account/Registration Fields Wiki article.

I would really appreciate alittle help on this one

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

I didn’t really understand your problem, however I’ve the solution you are looking for - I think grin . code/core/Mage/Customer/controllers/AccountController.php - function createPostAction (line 185-272). Try this:

$customer->setGroupId(3);
(3 being equal to the id of the Retailer group) right before the try statement at line 225.

Hope it helps and good luck mate smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
zep007
Sr. Member
 
Avatar
Total Posts:  131
Joined:  2008-05-15
Connecticut
 

Bockbertil,

Thanks bud!  That will get me started in the right direction. 

EDIT: Works perfectly!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top