Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login with phone number?


Guest

Recommended Posts

has this been done before? 

 

I want to enable customers to login with either their e-mail or phone number... Also i assume that i could add a master pass contrib and use that to take phone orders 

 

any ideas?

Link to comment
Share on other sites

yes..... but i have hit a wall....

 

while the readme with find and replace is good its make for 2.2 and i run 2.3.4 and spec the login.php does not match very good

 

any chance i can get a bit of help?

Link to comment
Share on other sites

Hi

 

How about trying to use the already exisiting customers_telephone field in the customers table?

 

This is a rough login module based on the current cm_login one - you should uninstall the cm_login and install this one - note this is based on Burt's really useful 234bs code so yours may differ a bit (especially form validation) if you are on a normal 234.

 

It will look at the customers_telephone field and compare that to the input - it will strip whitespace (as MrPhil suggests) from the input so if you have (for example) a phone number in the database of 123456 and enter that or 123 456 - you're in. It will not, however, let you in if you enter 123 456 if  the database also holds 123 456 because of the whitespace stripping. Likewise any brackets or stuff may complicate the idea - customers may tell you their number is:

 

+44 (0) 1970 456 781

 

and then try to logon using

 

01970456781

 

so that would not get them in - you could use a regex in the sql query but I think that's maybe going too far - trying to foresee what a numpty customer does is beyond me.....

 

So there's also a need to either setup an sql query that will search on the customers_telephone field along the lines of this http://stackoverflow.com/questions/15505011/mysql-search-a-field-ignoring-spaces- however that's beyond me this time of night and over complicates the setup?

 

The other option would be to edit the code that allows customers to enter their telephone number on signup/edit account so that the spaces are stripped before it is saved to the database - see create_account.php attached at around line 100 for the idea - you'd need to edit account_edit.php and also any admin ability to edit/save the phone field. You'll also need the language file to be updated as stated in the create-account at line 105

 

There is also the remote possibility  that two genuine  customers may share a phone number? Not sure but this code will stop them having individual accounts

 

This is a rough alpha code zip only - try it out and run with it if it works, if it does not then just bin it

234bs_phone_login.zip

 

 

Link to comment
Share on other sites

morning... just tilted out of bed

 

as for customers with the same number i guess its so rare since everybody uses cell phones these days

 

at least danish phone numbers are easy... its 8 digits only and no leading 0... also we dont use area codes so its the same 8 numbers no matter what

 

the only thing that differ is that some like to write their number as 12345678 others prefer 12 34 56 78 or 123 456 78

 

will try your idea thou, sounds better than the contrib i found, need breakfast first thou

Link to comment
Share on other sites

Hello,

... the only thing that differ is that some like to write their number as 12345678 others prefer 12 34 56 78 or 123 456 78 ...

 

I looked in my database and I find in descending order of use (in France, we have 10 digits) :

- 0123456789

- 01 23 45 67 89

- 01.23.45.67.89

- 0123 456 789

- 01-23-45-67-89

and for mobile phones wher X cab be "6" or "7":

- 0X23456789

- 0X 23 45 67 89

- 0X.23.45.67.89

with OsC 2.2 since 2006 ...

Link to comment
Share on other sites

thinking more on this as i have just added the payment gateway

 

hmm

 

when an account is created.. yes strip spaces etc so that its just 8 plain numbers.. or whatever

 

at the login a new box so that customers can opt to use either mail or number.... again in number strip out spaces etc..

 

 

 

but yes i'm on a normal 234..

 

time to try the zip

Link to comment
Share on other sites

matched up the files.... as i see things:

 

/create_account.php    that ones is the one that differ.

 

the rest is the same, apart from that i dont use english but the defines are the same and text translates to same meaning

 

have i missed anything?

Link to comment
Share on other sites

the bold text on the right and the box'es on the lower left comes when i install it

 

i wonder why there are not any text before the box'es like the top ones?

Link to comment
Share on other sites

btw... as i want to install a point reward module later on to replace stamps on back of menu cards i have installed a master password contrib...

 

 

so yes using the customers phone number makes a lot sense, my plan for the linked contrib i found was in fact just to take the customers phone number and make that the customer number... 

 

on the other hand if the customer updates the phone number and cant remember the old one then the store would have a problem

Link to comment
Share on other sites

hmm.....

 

i was thinking why not just rewrite the login part to use phone number instead of mail? 

 

for account create it will just leave it as it is

 

in this way the store can use the same webstore as a kind of POS system...

 

i have given a look at Ollacart since its no longer commercial, but i cant get it to work ( http://www.oscommerce.com/forums/topic/407813-ollacart-point-of-sale-for-oscommerce-ocpos/page-2 )

Link to comment
Share on other sites

any idea on how i could do that? ie rewrite the standard login box in 234 so that it has a phone number and pass for login?

 

i dont want to mess with the create account 

Link to comment
Share on other sites

any one have an idea on how i can add phone number to the login box so that customers (and store) can choose whatever they want to use email or phone number to login??

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...