| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Use E-mail address instead of username 3.5.x & 4.0 | ||||
|
|
Thread Tools | Search this Thread |
#61
|
|||||||||
|
|||||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
posting removed. see my other posting below.
__________________
~Tyson |
|||||||||
#62
|
|||||||
|
|||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
When you say you set the email field to "unique", what exactly do you mean and how do I do that?
Quote:
__________________
X-Cart Gold v4.4.1 |
|||||||
#63
|
|||||||
|
|||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
Quote:
Quote:
__________________
Location: UK X-Cart: Gold 4.4.2, Status: Finalizing Template: Colors Free Mods: Colour Coded Orders, FAQ Manager Paid Mods: None... yet. Server: Linux, Apache: 2.2.15 (Unix), MySQL: 5.0.90-community, PHP: 5.2.13 |
|||||||
#64
|
|||||||||
|
|||||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
This is how I forced my users to use their email address as their username. It allows the user to make changes to their email address after registering but the username will never change.
Use PHPmySQL to set the email field to "Unique" (in the xcart_customers table) Add the following code at the top of include/register.php (this will force all email addresses and usernames to be lowercase) Quote:
Add the following code to the bottom of /check_email_script.tpl Quote:
Find the code below in /main/register_account.tpl and add the below bolded javascript property to code below: (whenever the user clicks on the "username" or "password" fields (when registering or updating info) the "username" field and "uname" variable get set to equal whatever is in the "email" field. This works pretty well. There is one small catch though, after registering if the user changes their email and clicks in the "password" field(s) the script will change the hidden "uname" variable to equal the new email address and will cause an access denied error upon submit because the script is trying to reset the username as well which is not allowed. If you're lazy you could just use the OnFocusOut javascript control only on the "uname" text fields.) Quote:
__________________
~Tyson |
|||||||||
#65
|
|||||||
|
|||||||
Re: use email rather username
Thank you for that. Worked like a charm!!!
__________________
X-Cart Version 4.1.8 |
|||||||
#66
|
|||||||
|
|||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
Yes I got it to work.
__________________
X-Cart Version 4.1.8 |
|||||||
#67
|
|||||||
|
|||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
On the Code below (in /main/register_account.tpl) I changed <input type="text" under the {else} to <input type="hidden" so people can't type anything into the Username. Then just put a note at the top saying that the e-mail address will be the Username.
Code:
__________________
Location: UK X-Cart: Gold 4.4.2, Status: Finalizing Template: Colors Free Mods: Colour Coded Orders, FAQ Manager Paid Mods: None... yet. Server: Linux, Apache: 2.2.15 (Unix), MySQL: 5.0.90-community, PHP: 5.2.13 |
|||||||
#68
|
|||||||||
|
|||||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
#43,
xcell67 ... your mod worked for me on testing 4.1.6. Thanks! Only addition would be the change the language on lbl_username_n_password , which I did to say "Password (your user name is your email address)"
__________________
x-cart Gold 4.7.4 RedHat Linux 7.2; Pearl 5.20.2; PHP 5.5.26; MySQL 5.6.27, server 5.1.54; Ruby 2.1.5p273; Python 3.4.2; Several mods in menu and skin, BSCE shipping-per-product, CDSEO Pro |
|||||||||
#69
|
|||||||
|
|||||||
Re: Use E-mail address instead of username 3.5.x & 4.0
The attached .jpg shows how I have the Registration Help text at the top of the Register Page under 'Create Account'.
Under the red line (I cut the page down so it would fit on the Forums) I have shown how the Contact Information part of the page looks. I think it's pretty good, any suggestions? Also, I'm wanting to make it a requirement that Passwords are at least 6 characters long, how do I do this?
__________________
Location: UK X-Cart: Gold 4.4.2, Status: Finalizing Template: Colors Free Mods: Colour Coded Orders, FAQ Manager Paid Mods: None... yet. Server: Linux, Apache: 2.2.15 (Unix), MySQL: 5.0.90-community, PHP: 5.2.13 |
|||||||
#70
|
|||||||
|
|||||||
Re: it is wrong to do in this way!!
i try the #43 method.
however, i found that the logic is wrong. the method in #43 is simply replace the field username by the user email. however, it will cause a BIG problem if buyer made an order, then change the email address. as there is many foreign key "login" in other tables. it will break all the consistent of the database. 2nd problem is, the login field only have VARCHAR(32) however, in my 5000 custmers reocrd, there are more than 200 ppl having 32-38 characters in the email. so, if you simply replace the "login" by using the "email" buyer will never able to login I am sorry that I don't know how to do in programming. But it is suggested to modify to do in this way: 1. mask the login field in the signup, and contact field (may be display as "same as email address") 2.check the email address exist, if exist, display the error message. 3. when new buyer registered, simply assign "1" to the "login" name for the frist buyer. for the 2nd+ buyer, query the database, get MAX(login)+1 Now, the real login name for the buyer will be "1", "2", "3" 3. change the login form, when ppl type the email address in the login field. the x-cart backend simply find the REAL username number by using the email address. in this case, even the buyer change the email address AFTER sign up or ordered something. there real login name is still NOT change. what have been changed is only the email. any comment is welcome. hope this can help ppl to find the solution. as i have ask x-cart, they ask for USD200 for this mod.... i am thinking change to ***** for this reason.
__________________
-- |
|||||||
|
|||
X-Cart forums © 2001-2020
|