| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Trying to always use cust email as user ID.... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Many sites use the customer email address as their userID. Can anyone offer any insight as to how I can eliminate the 'Username' field on the registration form and ALWAYS have xcart use the customer email address?
Thanks, Piper
__________________
x-cart 3.4.4 (UNIX) |
|||||||
#2
|
|||||||
|
|||||||
![]() In 3.5.x, I tried fiddling with include/register.php and made $uname=$email, and commented out the username field in skin1/customer/main/register.tpl.
I thought it worked but when I tried changing the user id, an sql error occured. I remember reading a thread where someone had done it before, I hope that person pops up again on this thread. |
|||||||
#3
|
|||||||
|
|||||||
![]() When you say change $uname=$email, what section in register.php did you change this in? I had searched register.php for a while before posting here, but I could not find the exact places to edit.
however, I did find the following bit of code that may resolve the SQL error. In register.php, search for Code:
Just below those lines, are the lines of code that query the DB. In that chunk, change: Code:
Code:
Meanwhile, if you could give me some more detail on where you changed your code, we might be able to piece this together! Thanks, Piper
__________________
x-cart 3.4.4 (UNIX) |
|||||||
#4
|
|||||||
|
|||||||
![]() Hi Piper,
First I modified this code for 3.5.6: Code:
I took out $uname=tmp check and also the empty($unamee) in $fillerror. so the code became this: Code:
I did this so the cart wouldn't record an error if the username wasn't submitted. Then I altered: Code:
At the bottom I entered if (empty($uname)) $uname= $email; I did this so the cart would automatically fill the empty username field with the email address. I left the Add New/ and Update customer tables alone. Let me know if you figure it all out. |
|||||||
#5
|
|||||||
|
|||||||
![]() I've been wanting to do this for awhile. Thanks for the post.
I just tried your method in X-Cart 4.0.1 and it works... One question though. How do you deal with someone that changes their e-mail. The way you have it, without touching other parts of register.php when you change your e-mail your old e-mail (username) stays the same. General Question: If you were to use e-mail as your username, would it mess up the orders history for that particular person when they change their e-mail (username)? -Mike |
|||||||
#6
|
|||||||
|
|||||||
![]() Mike,
The problem you just mentioned is the reason why I don't use the mod for my own shops. I was hoping that someone else knew the solution, but no one wants to share ![]() |
|||||||
#7
|
|||||||
|
|||||||
![]() Just to add an additional comment. I was thinking of keeping the username, but also allow the Customer to login using either their e-mail or their username. One company that does that is textbookx.com which sells books. I think that way, the Customer can alter their e-mail all they want, and they don't have to worry about remembering a username.
This may seem ridiculous, but at the moment it is the only way I can think of for allowing the Customer to use their e-mail to login. This would be a nice feature for the X-Cart team to put into their product. And to please everyone just have checkbox so you can turn the feature on and off, but that would probably cause a problem if you switch back and forth from the two methods. Just my thoughts. -Mike |
|||||||
#8
|
|||||||||
|
|||||||||
![]()
__________________
X-Cart Gold 4.0.17 & 4.0.18 Linux Server Hands-On Hosting http://www.CoreCases.com - Ipod Cases http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need |
|||||||||
|
|||
X-Cart forums © 2001-2020
|