Hi,
I will try to explain it more clearly. I need field in joomla user registration and hikashop user registration called "Surname" I need it to act like default "Name" field. I use joomla registration and in checkout hikashop registration. So if someone register first with joomla registration. Name, login name, password, email are synchronized with hikashop. Or if someone goes to checkout he will be asked to register with hikashop registration and all entered data will be synchronized with joomla user.
So I creaded field in joomla. I added this code to /components/com_users/models/forms/registration.xml:
<field name="surname" type="text"
class="inputbox"
description="COM_USERS_REGISTER_SURNAME_DESC"
label="COM_USERS_REGISTER_SURNAME_LABEL"
required="true"
size="30"
/>
I added same to administrator..../user.xml file so field is visible in admin panel.
Created in phpmyadmin field with name "surname" type "varchar" in table xxxx_users
Then I created custom field with column name"surname" in user table (Picture attached) and added this code to user/registration view file:
<div class="hikashop_registration_surname_line form-group" id="hikashop_registration_surname_line">
<div class="key col-sm-3 control-label">
<label for="surname">
<?php echo JText::_( 'HIKA_USER_SURNAME' ); ?> *
</label>
</div>
<div class="col-sm-9">
<input type="text" name="data[user][surname]" id="surname" value="<?php echo $this->escape($this->mainUser->get( 'surname' ));?>" class="inputbox required" maxlength="50" />
</div>
Everything shows correctly but surname field wont synchronize between joomla user and hikashop user like it does with default field "Name". Also if nothing is entered in that field on hikashop registration, system won't give error message that you need to enter surname first to proceed.
Probably I did something wrong or I miss something.
Any help would be appreciated.
Update. So now if user register with joomla registration it gets synchronized with hikashop in hikashop>customers>users
However if registered in checkout with hikashop registration field "surname" won't get synchronized with joomla or hikashop>customers>users
Tried with protostar template and got same...
Regards