Jump to content

adding select into registration


nooBody
 Share

Recommended Posts

Hi I add into my registration form
prestashop\classes\Customer.php

    /** @var string typeaccount */
 public    $typeaccount;

   /** @var string ICO (optional) */
 public    $ico;

   protected $tables = array ('customer');

    protected     $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email');
    protected     $fieldsSize = array('lastname' => 32, 'passwd' => 32, 'firstname' => 32, 'email' => 128, 'dni' => 16, 'typeaccount' => 32, 'ico' => 10);
    protected     $fieldsValidate = array('secure_key' => 'isMd5', 'lastname' => 'isName', 'firstname' => 'isName', 'email' => 'isEmail', 'passwd' => 'isPasswd',
        'id_gender' => 'isUnsignedId', 'birthday' => 'isBirthDate', 'newsletter' => 'isBool', 'optin' => 'isBool', 'active' => 'isBool', 'dni' => 'isDni', 'typeaccount' => 'isGenericName', 'ico' => 'isGenericName');

   protected     $table = 'customer';
   protected     $identifier = 'id_customer';

   public function getFields()
   {
       parent::validateFields();
       if (isset($this->id))
           $fields['id_customer'] = intval($this->id);
       $fields['secure_key'] = pSQL($this->secure_key);
       $fields['id_gender'] = intval($this->id_gender);
       $fields['id_default_group'] = intval($this->id_default_group);
       $fields['lastname'] = pSQL($this->lastname);
       $fields['firstname'] = pSQL($this->firstname);
       $fields['birthday'] = pSQL($this->birthday);
       $fields['email'] = pSQL($this->email);
       $fields['dni'] = pSQL($this->dni);
       $fields['newsletter'] = intval($this->newsletter);
       $fields['newsletter_date_add'] = pSQL($this->newsletter_date_add);
       $fields['ip_registration_newsletter'] = pSQL($this->ip_registration_newsletter);
       $fields['optin'] = intval($this->optin);
       $fields['passwd'] = pSQL($this->passwd);
       $fields['last_passwd_gen'] = pSQL($this->last_passwd_gen);
       $fields['active'] = intval($this->active);
       $fields['date_add'] = pSQL($this->date_add);
       $fields['date_upd'] = pSQL($this->date_upd);
       $fields['deleted'] = intval($this->deleted);
       $fields['typeaccount'] = pSQL($this->typeaccount);
       $fields['ico'] = pSQL($this->ico);
       return $fields;
   }




and in
prestashop\themes\prestashop\authentication.tpl

    
{l s='Additional information'}


{l s='Company'}
           <input type="text" class="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{/if}" />



{l s='Typ účtu'}

Common
Student
Company




{l s='IČO'}
           <input type="text" class="text" id="ico" name="ico" value="{if isset($smarty.post.ico)}{$smarty.post.ico}{/if}" />



It show this error

There is 1 error :

1. an error occurred while creating your account


It works as it wants :(
Could someone help me?
It could be by bad hosting?

Thanks a lot

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More