Jurist Posted May 20, 2019 Share Posted May 20, 2019 Hello, As in the title, is it possible to assign customer to a different than a default customer group when he registers? I know it could be easily done via cron script that would go through entire database and just change ID of the customer group, but how to do that during checkout? If "company" field is filled during checkout he is assigned to "trade" group. Any idea how to do that? Thanks Link to comment Share on other sites More sharing options...
Jurist Posted May 21, 2019 Author Share Posted May 21, 2019 In case anybody were interested and having similar issue, AuthController.php processSubmitAccount() function needs an override. after line 244: if($is_company) { $customer->addGroups(array(4)); } else { $customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP'))); } Group 4 is my "Trade" group ID. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now