- Posts: 272
- Thank you received: 13
wrong last name pre filled in address form during
- deltafidesign
-
Topic Author
- Offline
Less
More
12 years 9 months ago #136591
by deltafidesign
wrong last name pre filled in address form during was created by deltafidesign
-- 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?
-- 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.
12 years 9 months ago #136623
by nicolas
Replied by nicolas on topic wrong last name pre filled in address form during
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:
But that's a hack...
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:
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;
}
Please Log in or Create an account to join the conversation.
- deltafidesign
-
Topic Author
- Offline
Less
More
- Posts: 272
- Thank you received: 13
12 years 9 months ago - 12 years 9 months ago #136637
by deltafidesign
Replied by deltafidesign on topic wrong last name pre filled in address form during
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?
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: 12 years 9 months ago by deltafidesign.
Please Log in or Create an account to join the conversation.
12 years 9 months ago #136766
by nicolas
Replied by nicolas on topic wrong last name pre filled in address form during
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.
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.242 seconds