- Posts: 75
- Thank you received: 1
Last name prepopulted
11 years 7 months ago #192487
by mterry2
Last name prepopulted was created by mterry2
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Chrome 36.0.1985
Hi. On the address entry screen at checkout, the last name field is pre-populated with the user's first name. How can I change this so either the first name field is pre-populated, or stop the system pre-populating at all?
Screen shot attached.
Thanks
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Chrome 36.0.1985
Hi. On the address entry screen at checkout, the last name field is pre-populated with the user's first name. How can I change this so either the first name field is pre-populated, or stop the system pre-populating at all?
Screen shot attached.
Thanks
Please Log in or Create an account to join the conversation.
11 years 7 months ago #192512
by nicolas
Replied by nicolas on topic Last name prepopulted
Hi,
The system is not pre-populating the field with the user's first name.
The system is pre-populating the field with whatever the user entered as "Name" when he registered on the registration form of Joomla. It just happens that you entered your first name there instead of your last name or your full name, and that's why it looks strange to you.
if you don't want that, you would have to remove the line:
$address->address_lastname = $name;
in the file components/com_hikashop/views/address/view.html.php
But the best would be to use only the HikaShop registration form so that the user would directly have the firstname and the lastname fields on the registration form.
The system is not pre-populating the field with the user's first name.
The system is pre-populating the field with whatever the user entered as "Name" when he registered on the registration form of Joomla. It just happens that you entered your first name there instead of your last name or your full name, and that's why it looks strange to you.
if you don't want that, you would have to remove the line:
$address->address_lastname = $name;
in the file components/com_hikashop/views/address/view.html.php
But the best would be to use only the HikaShop registration form so that the user would directly have the firstname and the lastname fields on the registration form.
Please Log in or Create an account to join the conversation.
11 years 6 months ago #192595
by mterry2
Replied by mterry2 on topic Last name prepopulted
Thanks Nicolas. Yes, I see. I do use the Hikashop registration re-direct, so can I achieve one of the following as a solution:
1. Either change the registration form to separate first name, last name (as defined in my custom fields), rather than just show "name" as per attached screenshot OR
2. Where it shows name, can I amend the code so it requests "Full name" instead...if so, how do I do this? With an override perhaps?
Thanks
1. Either change the registration form to separate first name, last name (as defined in my custom fields), rather than just show "name" as per attached screenshot OR
2. Where it shows name, can I amend the code so it requests "Full name" instead...if so, how do I do this? With an override perhaps?
Thanks
Please Log in or Create an account to join the conversation.
11 years 6 months ago #192610
by nicolas
Replied by nicolas on topic Last name prepopulted
1. If you use the HikaShop registration form, the address fields are displayed on it and so, the user will enter his first name and last name during the registration and the data will already be correct (that is unless you removed the display of the address fields from the registration page).
2. That would be easier if you don't want to change your workflow. Just do a translation override of the key HIKA_USER_NAME :
hikashop.com/download/languages.html#modify
2. That would be easier if you don't want to change your workflow. Just do a translation override of the key HIKA_USER_NAME :
hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
Time to create page: 0.182 seconds