Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default How To Require A Specific Telephone Format? When Creating Account

    I would like all telephone numbers to be saved in this format: (XXX) XXX-XXXX. How can I modify the templates to have the number automatically convert when a customer enters XXX-XXX-XXXX or just XXXXXXXXXX when creating an account? I know I can change the minimum length, but I could not find how to do this, if it's possible. Please help if you can. Thank you in advance!!

    I'm using 1.3.9c.

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: How To Require A Specific Telephone Format When Creating Account?

    That's fine and good if all your customers are residing in the US or Canada.

    If you succeeded with your formatting I (living in the Land of OZ) would have a problem creating an account with your store as all phone numbers in Australia are 10 digits including a 2-digit area code (except for some 13 numbers). Our mobile phones have a 4-digit prefix. Same would apply to people form other parts of the globe. Could result in a loss of orders for you.

  3. #3
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: How To Require A Specific Telephone Format When Creating Account?

    Are all of your customers always US and/or Canada?

    If they are not, you'll have a problem because the rest of the world uses several dozen other formats, and the number may have more or less digits than that in total, and will certainly have a shorter or longer area code.

    These may enlighten:

    http://en.wikipedia.org/wiki/Categor...ers_by_country

    http://www.wtng.info/


    Your US format might be better served as +1 xxx xxx xxxx so that you're always sure of the country.

    That is, (505) 444 3333 or +1 505 444 3333 is in New Mexico
    and (505) 444 3333 or +505 444 3333 is in Nicaragua.

  4. #4
    Join Date
    Jan 2008
    Posts
    149
    Plugin Contributions
    0

    Default Re: How To Require A Specific Telephone Format When Creating Account?

    Good point. I hadn't thought of that. I'd say 99.9% of our orders are US/Canada, but we have had a few from Australia and maybe one or two other countries since launching two years ago. I guess you could say I'm a little bit of a perfectionist. I use the capitalize fields mod already to help improve the display of a customer's name and info. I just don't like having all lower case names, etc. on invoices and packing slips--it doesn't seem very professional when we are shipping our products, but I also don't want to manually edit each one. We were having the same issue with the phone #--everyone enters it differently.

    It'd probably be a long shot to think there's a mod available where it will automatically format the telephone # based on the country selected in the line above, huh?

    Appreciate the input guys!

  5. #5
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: How To Require A Specific Telephone Format? When Creating Account

    The best way to tackle phone numbers is to have separate fields for country code, area code (which will be blank in some countries), and local number.

    This makes things easy for you to update when you find that an area code in a particular country has changed and you need to edit a bunch of numbers.

    There are programs out there to correctly format numbers for each country but they have a huge database which needs regularly updating.

  6. #6

    Default Re: How To Require A Specific Telephone Format? When Creating Account

    Has anyone implemented the code for US phone numbers only. I have a company that for regulations purposes can only sell in the united states. I need to verify the xxx-xxx-xxxx format. Is there a good script out there already done that will check?
    thx
    ----
    Mighty Mia

 

 

Similar Threads

  1. v154 ERROR_CAPCTHA when creating an account
    By corbe23 in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 20 Jun 2015, 05:48 AM
  2. v139h how to get mail when creating account at localhost?
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 15 May 2012, 01:58 AM
  3. Error when creating an account.
    By Graphicman in forum General Questions
    Replies: 4
    Last Post: 23 Aug 2010, 10:33 AM
  4. Error when creating new account
    By sinsor in forum Managing Customers and Orders
    Replies: 1
    Last Post: 17 Nov 2009, 10:14 PM
  5. No phone requirement when creating account
    By Free*\/*Bird in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 17 Aug 2006, 10:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg