- Posts: 29
- Thank you received: 0
registration issue
13 years 6 months ago #96548
by bruntt
registration issue was created by bruntt
My client wants the cart set to NOT require registration.
Under "Checkout," we have "login" - "no" and "registration" - "no registration"
The problem is that returning customers cannot purchase because the system tells them the email address is already in the system.
New customers get registered anyway. I can delete those registrations, but the probem will happen again in the future.
t
Under "Checkout," we have "login" - "no" and "registration" - "no registration"
The problem is that returning customers cannot purchase because the system tells them the email address is already in the system.
New customers get registered anyway. I can delete those registrations, but the probem will happen again in the future.
t
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96619
by Xavier
Replied by Xavier on topic registration issue
Hi,
For that, you will probably have to edit the class "user" in "administrator/components/com_hikashop/classes/user.php", function "register()" and edit the following if condition:
Be careful it's a core edition, you change will be lost at each update. And it require PHP knowledge.
For that, you will probably have to edit the class "user" in "administrator/components/com_hikashop/classes/user.php", function "register()" and edit the following if condition:
Code:
if($simplified==2){
$this->database->setQuery('SELECT * FROM '.hikashop_table('user').' WHERE user_email = '.$this->database->Quote($userData->user_email));
$userInDB = $this->database->loadObject();
if(@$userInDB->user_cms_id){
JError::raiseWarning('', JText::_('EMAIL_ADDRESS_ALREADY_USED'));
return false;
}
$this->user_id = 0;
if(isset($userInDB->user_id)){
$this->user_id = $userInDB->user_id;
}
if(!$this->user_id){
$this->user_id = $this->save($userData);
}
//unpublish previous addresses so that there is no information leakage
$query = 'UPDATE '.hikashop_table('address').' AS a SET a.address_published=0 WHERE a.address_user_id='.(int)$this->user_id.' and a.address_published=1';
$this->database->setQuery($query);
$this->database->query();
}
Be careful it's a core edition, you change will be lost at each update. And it require PHP knowledge.
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96667
by bruntt
Replied by bruntt on topic registration issue
What would I change that code to?
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96708
by Xavier
Replied by Xavier on topic registration issue
Hi,
My mistake, you don't have to edit the file.
The problem is that you tried to checkout with an email already used for an existing account.
If you try to checkout with a new email (never registered on your website), and then cehckout again, you will not have this error, because the mail is not registered for an account.
My mistake, you don't have to edit the file.
The problem is that you tried to checkout with an email already used for an existing account.
If you try to checkout with a new email (never registered on your website), and then cehckout again, you will not have this error, because the mail is not registered for an account.
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96750
by bruntt
Replied by bruntt on topic registration issue
OK, but lets say I come back tomorrow. Will it tell me I can't buy because my email address is already in the system?
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96753
by nicolas
Replied by nicolas on topic registration issue
No. TRy with a new email address that is not used by a user account on your website and you'll see that you can do as many orders with that email as you want in "no registration" mode.
The following user(s) said Thank You: bruntt
Please Log in or Create an account to join the conversation.
13 years 6 months ago #96754
by bruntt
Replied by bruntt on topic registration issue
Thanks. My client told me something different happened when he tested, but I believe he was mistaken.
t
t
Please Log in or Create an account to join the conversation.
Time to create page: 0.204 seconds