Cyrius91 Posted February 11, 2014 Share Posted February 11, 2014 Currently in PS 1.4.9I want that the user can choose from three groups:-Private person-Professional-StudentThe form offers me what I want, recording goes well until the end and saves my client unless it remains in the group by default 1.The value of the radio input is not taken into account.Someone could give me an opinion?Thank you.Changing the registration form authentication.tplin:<fieldset class="account_creation"><h3>{l s='Your personal information'}</h3>add this:<p class="radio required"> <span>customer account</span> <input type="radio" name="id_default_group" id="id_default_group1" value="1" {if isset($smarty.post.id_default_group) && $smarty.post.id_default_group == '1'}checked="checked"{/if} /> <label for="id_default_group1">Private person</label> <input type="radio" name="id_default_group" id="id_default_group2" value="2" {if isset($smarty.post.id_default_group) && $smarty.post.id_default_group == '2'}checked="checked"{/if} /> <label for="id_default_group2">Professionnal</label> <input type="radio" name="id_default_group" id="id_default_group3" value="3" {if isset($smarty.post.id_default_group) && $smarty.post.id_default_group == '3'}checked="checked"{/if} /> <label for="id_default_group3">Student</label></p>Changing the AuthController.php fileunder:/* Preparing customer */$customer = new Customer();add this:$Idgroupdef = $_POST['id_default_group'];then under:$customer->active = 1;add:if (!$customer->add(true,true,$Idgroupdef))File change customer.php line 148public function add($autodate = true, $nullValues = true, $Idgroupdef) Link to comment Share on other sites More sharing options...
Cyrius91 Posted September 15, 2014 Author Share Posted September 15, 2014 Problem solved. I haven't seen the controler file in overide folder. I close thid topic. 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