Accepting Orders From Canada

Discussion in 'PHP' started by kevin7654, Nov 19, 2006.

  1. #1
    I'm about to start accepting orders from Canada. Currently my address inputs are

    first name, last name
    street address 1
    street address 2
    city, state, zip


    How do I need to change this for Canada and does anyone have any suggestions or guides for verification?

    I figure I will need to add a country input(is this necessary?) and allow the zip code to be greater than 5 digits. Right now I verify that the zip code is 5 digits with no spaces or letters, so accepting Canadian addresses makes this a fair amount more complex.

    Anyone have experience with this?
     
    kevin7654, Nov 19, 2006 IP
  2. IR5

    IR5 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you want to accept orders only from Canada, then you don't need a country input.
    Your order page consider all visitors from canada, and you only put Canadian states to state list and Canadian cities to city list.
    a limit on zip is not really necessary , let it be as long as user need.

    Also, you can use maxmind geoip service to check if the visitor is really from Canada.

    Phone number input is also good.
    You can confirm the user by phone verification. this can be handled manually of automatically (There should be some softwares exist for this, but I don't know any)

    ----------------------------
    If you want to add Canada in addition of other countries, then you need a country field.
    Other things are same as above.
     
    IR5, Nov 20, 2006 IP
  3. adsblog

    adsblog Active Member

    Messages:
    659
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #3
    You can use ip2location sample script for show your form to canadian visitors .
    here :
    www-ip2location-com
     
    adsblog, Nov 20, 2006 IP
  4. Todd

    Todd Active Member

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    Just add the provinces and territories to you state list and modify the zipcode field to accept six characters (LNLNLN).

    If you want to tighten it, you could ensure the first letter of the postal code matches the province.
     
    Todd, Nov 20, 2006 IP
  5. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That would be a mistake. Postal codes in my part of British Columbia start with a "V" and postal codes in most of Manitoba start with the letter "R".

    Todd is correct in stating that postal codes in Canada are six characters in lenght, excluding the space which normally breaks the postal code into two parts.

    For instance, a store here in White Rock, British Columbia, has the postal code "V4B 3E5" while my postal code does not contain a B or a C.
     
    clancey, Nov 20, 2006 IP
  6. Todd

    Todd Active Member

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #6

    Not really a mistake but a lack of clarity on my part. By making them match, I was alluding to the first letter corresponding to the province, not that it had the first letter of the province name.

    As you've indicated, BC postal codes start with a V. Those in Ontario start with a P, L, K, M or N. You can get a graphical representation here: http://en.wikipedia.org/wiki/Canadian_postal_code

    In a former life, I did address validation coding for call center applications. That was just one of the trivia bits I picked up :)

    Todd...
     
    Todd, Nov 21, 2006 IP