X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Use E-mail address instead of username 3.5.x & 4.0 (https://forum.x-cart.com/showthread.php?t=8809)

Vetrivel 02-20-2009 05:50 AM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
For xcart version 4.1.9 pro version

I just changed the username to email address and i need to know whether i missed anything.
I think it is working fine ,but i don't know the side effects.

1.altered the table xcart_customer ->login field length to 128.
2.altered the table xcart_orders->login field length to 128.
3.include /login.php
changed this line ->
$is_username_len_err = strlen($HTTP_POST_VARS["username"]) > 128;
4.include/register.php
replace this
$allowed_update = (($usertype == $current_area && !empty($login) && !empty($uname) && $login == $uname) || ($current_area == "P" && $active_modules["Simple_Mode"]) || $current_area == "A");

with
$allowed_update = (($usertype == $current_area && !empty($login) && !empty($uname) && (($login == $uname)||($login == $email))) || ($current_area == "P" && $active_modules["Simple_Mode"]) || $current_area == "A");

5.in register.tpl

Add this:
inside the below line:&& checkEmailAddress(document.registerform.uname, 'Y')
after this condition:{if $default_fields.email.avail eq 'Y'} && checkEmailAddress(document.registerform.email, '{$default_fields.email.required}'){/if}

if (check_zip_code(){if $default_fields.email.avail eq 'Y'} && checkEmailAddress(document.registerform.email, '{$default_fields.email.required}'){/if}{if $config.General.check_cc_number eq "Y" AND $config.General.disable_cc ne "Y"}&& checkCCNumber(document.registerform.card_number,do cument.registerform.card_type) {/if}&& checkRequired(requiredFields)) {ldelim}

Is this enough ?
It works fine for me.

milla_c 02-22-2009 09:43 PM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
1. If you use the e-mail address for username, does the providers also use their e-mail address as username? I guess most providers will also register as customers - then they will have to have 2 e-mail addresses?

2. How do you handle it when a user changes his e-mail address? Does the username also change and how do you then keep track of the user's orders under the previous username (e-mail)?

rhu 01-25-2010 10:22 AM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
has anybody tried this for v4.3?

TL408 01-25-2010 10:26 AM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
Quote:

Originally Posted by rhu
has anybody tried this for v4.3?

Probably a better bet to wait for 4.4 release in a few months. This feature suppose to be built-in with 4.4.....

But then again, I couldn't confirm if they are still releasing 4.4.x. or just going straight from 4.3 to 5.0 instead.

xplorer 01-26-2010 05:28 AM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
Hi!

Most likely we will release 4.4

TL408 01-26-2010 05:45 AM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
Quote:

Originally Posted by xplorer
Hi!

Most likely we will release 4.4


Thank you very much for the reply. Can you please let us know the release time lime for 4.4? Is still March time frame for beta? And then approximately when we can expect the final release for 4.4? Thank you again!

Vetrivel 01-26-2010 06:44 PM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
Hi,
I am not sure of the provider login.
Yes ,they need to use email address for register ,but most of the admin will register for the provider by themself.
To handle the username changes ,I have two option.
1.) just change the email address alone and dont change the username value.It means that once they created teh account ,they cant change the username.But practically it leads to confusion to the user8O
2.) just tweak login page to use the email address field and login field to make the user login.
It means that once customer login they cant change the username (login field ) ,but they can change the email address and during the login we need to check the username agianst login field and email address field .


I feel second option will works better without any problem if you implement it correcly.


Quote:

Originally Posted by milla_c
1. If you use the e-mail address for username, does the providers also use their e-mail address as username? I guess most providers will also register as customers - then they will have to have 2 e-mail addresses?

2. How do you handle it when a user changes his e-mail address? Does the username also change and how do you then keep track of the user's orders under the previous username (e-mail)?


MercuryMindsSales 07-13-2010 04:03 AM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
Just an update to everyone. Our latest release of One Page Checkout (integrated version) supports email as username by default. Checkout more details here http://www.mercuryminds.com/product/x-cart-one-page-checkout-module.html

PM me here or contact us at sales@mercuryminds.com for any queries.

-Reva

smarta 07-28-2013 03:51 PM

Re: Use E-mail address instead of username 3.5.x & 4.0
 
Hi

after reading a lot of pages of info i am now pretty confused as to which code changes i need to implement!

I hope someone can provide an answer

using 4.4.2
I wish to allow (already registered) users to log in with either their username OR their email address


All times are GMT -8. The time now is 03:44 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.