![]() |
Hey,
Quote:
Sorry to hear that you are having trouble. I hoped you made a backup before applying this mod. As I indicated in your pm, this mod is only tested for 4.0.13 and NOT for 4.0.14. I guess there are some differences in the register code which may make this mod incompatible. Anyway, I will send you another pm regarding this. Now, as promised, I will post the updated code tested with 4.0.13 below. There was a bug in the dupliate email check when doing an update in the include/register. It is fixed in the updated code. I also will post some changes to templates such as recover password, profile modified etc... to show the email address instead of the auto generated username id. Hopefully, this update should be the last one as I have tested it extensively with 4.0.13. If you find any problems, please let me know. Thanks. --- /include/register.php v3.mod2 Code:
# mod2 Code:
# find original code snippet Code:
{* find original code snippet *} Code:
{* find original code snippet *} Code:
{* find original code snippet *} ------- The following changes below are completely optional. It changes the s the username to email for order export on regular csv or quickbooks. Just follow the instructions in the comment to make the change to the file. --- /skin1/main/orders_export.tpl {* mod.use.email.rather.username, replaced all $orders[oid].login with $orders[oid].email *} --- /skin1/modules/QuickBooks/orders_export_qb.tpl {* mod.use.email.rather.username, replaced all $orders[oid].login with $orders[oid].email *} ~x-light |
I'm using this with 4.0.14 and it works great! Thanks x-light.
Quote:
2019, this works with 4.0.14. Just start with the changes at the beginning of this thread and work through them. If you get errors chances are you've missed something. Quote:
Quote:
The Amazon way is simple. The user can change their e-mail address by logging in and supplying their old address, new address and password. A confirmation is then sent to the new address. I'm working on this and will post is as soon as I'm done. Jeff |
...
Nice mod!
|
My simple way of doing this (appears to work so far)
In /main/register_account.tpl change Code:
<TR> to Code:
<TR> You should also change the string for $lng.lbl_username to something like 'Email Address'. Easiest to do in webmaster mode I find. This forces the user (using javascript) to put in an email address as their username. HTH xgarb |
this is far simpler approach
I think this way it makes it easier as well to upgrade since not sql changes or any php changes required.
I was thinking of doing something similar too, like showing the user the email field and password field only and once they enter the email , then copy that info to the username field in a hidden way before saving to database. And their username and email address will be identical. That way the rest of the x-cart features will still work normally. However I am not very good at making these kind of changes. Can anyone help me on that. Hide username field, show email field and copy email entered to hidden username field bfore writing to database. thanks |
I tried x-light's MOD on 4.0.17 .. I didn't wort.. i got all sort of errors.. can someone varify? is it me? Did i make a mistake somewhere.. or this is not compatible with my version
|
Just updating my original post for 4.0.16+:
The $user_data query is different in my original post in include/login.php, look for this code now: Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE login='$username' AND usertype='$usertype' AND status='Y'"); Replace with: Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE (login='$username' or email='$username') AND usertype='$usertype' AND status='Y'"); Since this is such a minimal php change, patch tools *SHOULD* be able to update this line without much trouble. Keep in mind Upgrade kits also upgrade template .tpl files as well. :wink: |
Any successes on X-light's mod on 4.0.9?
|
Works great in 4.0.9, X-light VERY NICE WORK! Thanks!
|
Does this work with 4.0.13 pro?
Thanks, Greg x-cart pro 4.0.13 heavily modified |
All times are GMT -8. The time now is 04:11 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.