vyskoczilova Posted November 3, 2014 Share Posted November 3, 2014 Hi, we're moving from Joomla-VirtueMart to Prestashop but if I'm trying to import CSV with customers I can't find field "username" and it looks like they are obliged to log in with email, can I add somewhere option to log with username? We do have more than 2000 clients and it would be kind of stupid to write them about that change. Thanks a lot for your advice Karolina Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 4, 2014 Share Posted November 4, 2014 (edited) Karolina, I have never heard the same question A quick answer for you: 1. Prestashop does not support logging in with username. Moreover, "username" does not exist in customer table. 2. But you totally can customize the code and support it. Here are steps, in my opinion: 2.1. Add a new column into customer table saying "username". Refer to step #2.4 below. 2.2. Import your clients over 2.3. (Frontend) Change the login form, it should say "Email / username" and disable validating against email field. 2.4. Install this free module. I've written it, JUST FOR YOU Your clients now should be able to log in with username. Have fun! Tung Edited November 4, 2014 by TungCEO (see edit history) 1 Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 4, 2014 Share Posted November 4, 2014 Oops, I've turned out that, attachment is not allowed in a reply. Here you go: http://www.prestashop.com/forums/topic/376310-log-in-with-username-instead-of-email-module-attached/ Link to comment Share on other sites More sharing options...
Dead2010 Posted November 4, 2014 Share Posted November 4, 2014 hello, working in prestashop 1.6.0.9 ? greetings Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 5, 2014 Share Posted November 5, 2014 Yes, it works like a charm on 1.6.0.9. Cheers, Link to comment Share on other sites More sharing options...
vyskoczilova Posted November 6, 2014 Author Share Posted November 6, 2014 Hi, thanks a lot for your solution, but something is wrong because it's not working -either I cant find "username" field in my clients and either I can see sign email/username in the front end, what's wrong? my site here: http://demo.kybernaut.cz/yama/login?back=my-account Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 7, 2014 Share Posted November 7, 2014 @vyskoczilova It seems, your theme does not include this hook "DisplayCustomerAccountForm". In your theme, search for "HOOK_CREATE_ACCOUNT_FORM". Here is how it should looks like: Hope this helps! Tung Link to comment Share on other sites More sharing options...
vyskoczilova Posted November 8, 2014 Author Share Posted November 8, 2014 HI, thanks a lot, it's probably as you've said, but I'm not able to find solution myself the $HOOK_CREATE_ACCOUNT_FORM is just in middle of html tags. The theme is "Branchy" from ThemeForest. these files here: http://disk.kybernaut.cz/authentication.tpl (lines 388 and 640) http://disk.kybernaut.cz/order-opc-new-account.tpl (line 375) Link to comment Share on other sites More sharing options...
vyskoczilova Posted November 10, 2014 Author Share Posted November 10, 2014 (edited) I've checked it today with default prestatheme wich comes ith the installation and it's not working there as well. Do you have an idea what can be wrong? Printscreein with the default theme Could be the problem caused by using Czech instead of English? From my theme support I've got this respond: "Hi,Please Check your New Module(Log-in with username instead of email - Module) in Default Prestashop theme, if it's working ,then this module is also working in our theme. Our theme support all default functionality." Edited November 10, 2014 by vyskoczilova (see edit history) Link to comment Share on other sites More sharing options...
vyskoczilova Posted November 10, 2014 Author Share Posted November 10, 2014 Once more from the support: Hi,I was Check "Logging in with username" Module in default Prestashop theme and there is no any "User Name" Field that you say in "http://www.prestashop.com/forums/topic/376310-log-in-with-username-instead-of-email-module-attached/" this link.See Attach Screenshot: http://disk.kybernaut.cz/kybernaut_01.png and http://disk.kybernaut.cz/kybernaut_02.pngIf you still have any question then give me more detail about your issue with screenshot.http://demo.kybernaut.cz/yama/Best Regards,Krishna Kanani Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 11, 2014 Share Posted November 11, 2014 Hello there, Thanks for all the info. Actually, we haven't released that version (which works with registration form). It should works fine now. Check it out there. Hope this helps! Tung 1 Link to comment Share on other sites More sharing options...
vyskoczilova Posted November 11, 2014 Author Share Posted November 11, 2014 (edited) Hi, works like a charm, but one more thing: I suppose that Email is just my translation which should be "Email / Username" but, I can login with the username (great!!) but when I type, it make the form red and with "x" sign, could you get rid of it or just make it green as email is? login form: printscreen here and another minor problem (however it's working, which is perfect) - user name is not displayed in "Customers" overview in admin - printscreen, printscreen2 - but that's not urgent, I don't need to see it if it's working Edited November 11, 2014 by vyskoczilova (see edit history) Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 12, 2014 Share Posted November 12, 2014 That's true! I was aware of that, but I don't have a good solution rather than editing the template manually, so I don't want to patch into the module. Here is the fix if you want to do that: Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted November 12, 2014 Share Posted November 12, 2014 I've published the code on Github. Here it is: For those 2 reports / requests (do not validate email at login form + missing username columm in back office), can you please add 2 issues for that on Github repository? I will arrange time to fix later. Or that's so great if someone comes in and fix together. Cheers, 2 Link to comment Share on other sites More sharing options...
alex3954 Posted September 15, 2015 Share Posted September 15, 2015 Hello On prestashop 1.6.1.0 i do this: <input class="is_required validate account_input form-control" type="email" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" placeholder="{l s='Email address'}" /> but login form show error : Please enter a valid email address What can i do Greetings Link to comment Share on other sites More sharing options...
Recommended Posts