wrong last name pre filled in address form during

  • Posts: 272
  • Thank you received: 13
11 years 5 months ago #136591

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.2.2
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

I use CB for registration. I ask only email and password for registration so the username and joomla name assigned to user is the email address.

Now when I go to checkout the address form of hikashop show me the last name field already filled in with the email address value ('cause it take it from joomla name field).

That's bad 'cause csn confuse customers. Is it possible to not pre fill that field in this case?

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
11 years 5 months ago #136623

The issue here is really CB which set the email in the name of the user account... It should set the name not the email really.

If you don't want HikaShop to us the joomla user account name for that, you can always edit the file components/com_hikashop/views/address/view.html.php and remove the code:

$userCMS = JFactory::getUser();
				if(!$userCMS->guest){
					$name = $userCMS->get('name');
					$pos = strpos($name,' ');
					if($pos!==false){
						$address->address_firstname = substr($name,0,$pos);
						$name = substr($name,$pos+1);
					}
					$address->address_lastname = $name;
				}
But that's a hack...

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

  • Posts: 272
  • Thank you received: 13
11 years 5 months ago #136637

CB can't set name in this case because I dont ask for it during registration. I ask only an email and password so CB can fill joomla name only with that email value.

You say that it is an hack. Not a normal view override in this case? You mean I will lose that when upgrade?

Last edit: 11 years 5 months ago by deltafidesign.

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
11 years 5 months ago #136766

That's correct. It's not a view override as you have to edit the file directly via FTP.
You will have to reapply the change when you update/upgrade.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum