Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

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

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #121  
Old 02-20-2009, 05:50 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default 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.
Reply With Quote
  #122  
Old 02-22-2009, 09:43 PM
  milla_c's Avatar 
milla_c milla_c is offline
 

Member
  
Join Date: Oct 2008
Posts: 11
 

Default 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)?
__________________
M Conradie
x-cart pro

Reply With Quote
  #123  
Old 01-25-2010, 10:22 AM
 
rhu rhu is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 63
 

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

has anybody tried this for v4.3?
__________________
X-Cart 4.3.0 Gold
Reply With Quote
  #124  
Old 01-25-2010, 10:26 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default 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.
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #125  
Old 01-26-2010, 05:28 AM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

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

Hi!

Most likely we will release 4.4
Reply With Quote

The following user thanks xplorer for this useful post:
robertswww (01-26-2010)
  #126  
Old 01-26-2010, 05:45 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default 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!
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #127  
Old 01-26-2010, 06:44 PM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default 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 user
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)?
Reply With Quote
  #128  
Old 07-13-2010, 04:03 AM
  MercuryMindsSales's Avatar 
MercuryMindsSales MercuryMindsSales is offline
 

Senior Member
  
Join Date: Mar 2010
Location: www.mercuryminds.com
Posts: 160
 

Default 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
Reply With Quote
  #129  
Old 07-28-2013, 03:51 PM
 
smarta smarta is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 129
 

Default 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
__________________
4.4.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:35 AM.

   

 
X-Cart forums © 2001-2020