Jump to content

choix d un groupe a l inscription


Recommended Posts

bon alors j ai inseré a l fin de authentification.tpl

Vous êtes <input type=“radio” name=“id_group” id=“id_group6” value=“6” {if isset($smarty.post.id_group) && $smarty.post.id_group 6}checked="checked"{/if} /> Enseignant <input type="radio" name="id_group" id="id_group7" value="7" {if isset($smarty.post.id_group) && $smarty.post.id_group 7}checked=“checked”{/if} /> Elève/étudiant <input type=“radio” name=“id_group” id=“id_group8” value=“8” {if isset($smarty.post.id_group) && $smarty.post.id_group == 8}checked=“checked”{/if} /> Particulier


pis j ai modifié le code présent a la ligne _86 de authentification.php en remplaçant par

$customer->active = 1;
               if (!$customer->add()) // retour à la case départ ...
                   $errors[] = Tools::displayError('an error occurred while creating your account');
               else
               {
                   if(Tools::getValue('id_group',1)!=1) // on ajoute çà ...
                   {
                       $tmpGroup= new Group();
                       $tmpGroup->id=Tools::getValue('id_group',1);
                       $customer->addGroups($tmpGroup);
                   } 



IMPOSSIBLE DE TROUVER customer.add ?????????

Link to comment
Share on other sites

  • 1 month later...

bonjour,
quand vous rentrez:


$customer->active = 1;
if (!$customer->add()) // retour à la case départ ...
$errors[] = Tools::displayError('an error occurred while creating your account');
else
{
if(Tools::getValue('id_group',1)!=1) // on ajoute çà ...
{
$tmpGroup= new Group();
$tmpGroup->id=Tools::getValue('id_group',1);
$customer->addGroups($tmpGroup);
}
quelles lignes vous remplacez ( de où à oà ?)
car quand mon client termine son inscription, il arrive sur 1 page blanche (authentification.php), j'ai donc dû me planter quelque part.

merci de votre aide (c'est assez urgent)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...