jkfoong Posted September 27, 2018 Share Posted September 27, 2018 Hello. I want to add customer in the back office and prefill their email and password. But it seems like the code changed in AdminCustomersController is not working. Can anyone help me please? if (Tools::isSubmit('addcustomer') && Tools::isSubmit('submitFormAjax')) { $visitor_group = Configuration::get('PS_UNIDENTIFIED_GROUP'); $guest_group = Configuration::get('PS_GUEST_GROUP'); foreach ($groups as $key => $g) { if (in_array($g['id_group'], array($visitor_group, $guest_group))) { unset($groups[$key]); } } if (!$this->object->email){ $this->object->email = strval(Tools::getValue('firstname'))."@gmail.com"; $this->object->passwd = '123'; } } 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