change how joomla make the user name

  • Posts: 281
  • Thank you received: 3
7 years 10 months ago #260280

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5

HelloMy configuration for the fields registration is
address_firstname = name
address_lastname =surname
address_middle_name = name company

Now when user receive the email for the confirmation registration it shows hello dear "name+name company+ surname" and it is not very cool
That is couse the name user in joomla is composed of name+name company+ surname
It should be better name+surname+name company
Do you know how to change that??
Can I change the way that joomla make the name of usder from the hikashop fields?

Thanks
Frank

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 10 months ago #260281

Hi,

You would have to change the line:

$this->registerData->name = @$addressData->address_firstname.(!empty($addressData->address_middle_name)?' '.$addressData->address_middle_name:'').(!empty($addressData->address_lastname)?' '.$addressData->address_lastname:'');
In the file administrator/components/com_hikashop/classes/user.php

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

  • Posts: 281
  • Thank you received: 3
7 years 10 months ago #260325

Thanks fro your replay

I changed the code in this way:

$this->registerData->name = @$addressData->address_firstname.(!empty($addressData->address_middle_name)?' '.$addressData->address_lastname:'').(!empty($addressData->address_lastname)?' '.$addressData->address_middle_name:'');
Can you check teacher please :)
That influence just the joomla name right??
I changed directly that file can I make an override of that?

THank
Frank

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 10 months ago #260326

Hi,

It looks good.
And yes, it will only influence the Joomla name.
You can do an override. But it's a lot more complex:
www.hikashop.com/forum/2-general-talk-ab...custom-features.html
You you'll have issues anyway with HikaShop 3.0.0 since the code of that file changed quite a lot unless you really know what you're doing.

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

  • Posts: 281
  • Thank you received: 3
7 years 5 months ago #270745

Hello
How can I reach the same goal with hikashop 3.0
I see that that the file user.php in administrator/components/com_hikashop/classes/ is different fron the previus

THanks
Frank

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #270756

Hello,

In HikaShop 3, the line is almost the same, just that there is no more "$this->" at the beginning.

$registerData->name = @$addressData->address_firstname.(!empty($addressData->address_middle_name)?' '.$addressData->address_middle_name:'').(!empty($addressData->address_lastname)?' '.$addressData->address_lastname:'');

Regards


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum