![]() |
Has anyone got this working with 4.017 ?
|
Seems to work fine on 4.0.17
|
Hi,
I'm going to throw in my method for 4.1.0 rc4 in case some couldn't get the others to work. include/register.php find Code:
$fillerror = (empty($uname) || !empty($error) || empty($passwd1) || empty($passwd2) || ($passwd1 != $passwd2)); replace with Code:
$fillerror = (!empty($error) || empty($passwd1) || empty($passwd2) || ($passwd1 != $passwd2)); By deleting the error check for username, the cart will allow registrations without it. Find Code:
if (!@$error && $current_area == "C" && $active_modules["UPS_OnLine_Tools"]) { Replace with Code:
if (empty($uname)) $uname = $email; Since we're not allowing the customer to enter a username, the code above will automatically populate the username field with the email the customer supplies. Find Code:
$profile_values['email'] = $email; Replace with Code:
$profile_values['email'] = $email; When the customer updates their email, their login will also reflect the change. There's only a slight problem with this. If the customer updates any of their other information, everything is fine. But when they update their email, they will get logged out. I don't know what causes the logout but their email/login still gets changed. What I did for my cart was add a little note "Note: If you change your email address, you will have to re-login for security purposes" skin1/generate_required_fields_js.tpl Delete this code to prevent check for uname Code:
["uname", "{$lng.lbl_username|strip|replace:'"':'\"'}"], skin1/main/register_account.tpl You'll need to comment out the username fields: Code:
{* Anonymous account *} Code:
{* NOT anonymous account *} With the above code, I had to take <input type="hidden" name="uname" value="{$userinfo.login|default:$userinfo.uname}" /> out of the commented out code block because xcart needs it to finish the registration process. You can leave everything else commented out. All of the above satisfies your needs if you want the customer to use their email as their login. The extra stuff below will add in a second field for them to type their email twice for confirmation: skin1/main/register_contact_info.tpl or wherever tpl you have your email field in Add this under the intial email block: Code:
<TR> skin1/check_email_script.js Add this: Code:
if(document.registerform.emailtwo) { before return !err; at the end of the file </TR> [/code] |
xcell67 did you tried for final ver 4.1.0?:roll:
thank you. |
Works great in 4.0.18 - thanks!
|
Hello all! I need some expert advice. I am trying to get this patch to work.
ALTER TABLE `xcart_customers` ADD UNIQUE ( `email` ); it does seem to work (i patched through the xcart admin), however, when I try to create a account to test this, and use the same email as an existing account after i press submit I get this error on a blank white page: Code:
INVALID SQL: 1062 : Duplicate entry 'email@hotmail.com' for key 3 Also, there are not duplicate emails in the database. then it goes to "user created" dialog message but upon checking in the admin the user is not actually created. Any insight about this error. Any insight please let me know.. :-( |
Make sure you don't have the same email in the database for two different accounts.
|
Nope, there are no duplicate emails. Any other ideas?
|
Quote:
Thanks. |
any1? :(
|
All times are GMT -8. The time now is 03:02 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.