Last name prepopulted

  • Posts: 75
  • Thank you received: 1
9 years 8 months ago #192487

-- 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

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 8 months ago #192512

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.

Please Log in or Create an account to join the conversation.

  • Posts: 75
  • Thank you received: 1
9 years 8 months ago #192595

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

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 8 months ago #192610

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum