Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Location
    Rosebud, Victoria, Australia
    Posts
    310
    Plugin Contributions
    2

    Default Cleaning Up User Input

    G'day,

    Something that has annoyed me for quite some time is how an increasing number of customers seem to care not a jot about how they enter their name and address details. For example, it's common for everything to be given to us in lower case. Then our email salutations etc. look a tad unprofessional.

    Is there a Zen Cart plugin that helps to sanitize user input?

    Some rules I'd like to have applied are...

    Leading and trailing spaces are removed from all fields.

    Name, company and address input is capitalised. That is, all words start with a capital letter. Yes, I know there are some names that start with lowercase letters, but they are rare.

    Company and Street address should have not have punctuation, i.e no .,:; characters.

    For address formatting, if there is a company name, it should be on the first line and the person's name on the second line with Attn: in from, i.e.
    The Scuba Doctor
    Attn: Lloyd Borrett

    In the address...
    P.O. Box becomes PO Box
    G.P.O Box becomes GPO Box

    Flat xxx, Fxxx or F xxx becomes xxx/
    Unit xxx, Uxxx or U xxx becomes xxx/
    Apartment xxx, App xxx, Axxx, A xxx, or Appt xxx becomes xxx/

    Thoroughfares are abbreviated as follows:
    Alley - Ally
    Arcade - Arc
    Avenue - Ave
    Boulevard - Bvd
    Close - Cl
    Court - Ct
    Crescent - Cres
    Drive - Dr
    Esplanade - Esp
    Grove - Gr
    Highway - Hwy
    Lane - Lane
    Parade - Pde
    Place - Pl
    Road - Rd
    Square - Sq
    Street - St
    Terrace - Tce

    Suburb and City are all uppercase.

    Australian states and territories are abbreviated and uppercase, i.e.
    Australian Capital Territory - ACT
    New South Wales - NSW
    Northern Territory - NT
    Queensland - QLD
    South Australia - SA
    Victoria - VIC
    Tasmania - TAS
    Western Australia - WA

    If country is Australia, postcode must be four digits.

    If country is Australia:
    Phone number should be formatted as xx xxxx xxxx
    Mobile phone number should be formatted as xxxx xxx xxx

    Country should be all uppercase.

    AU or AUST for country, becomes AUSTRALIA.

    If the country is Australia, the country in not printed as a part of the address.
    If the country is not Australia, the country is printed as part of the address.

    Basically, I'd like what we store and output to conform as closely as possible to the Australia Post correct addressing standards. Of course, stores with customers mostly in a different country would want to apply slightly different rules, but the basics would be pretty universal.

    It would also nice to be able to run these rules over existing customer and order information in the database as well.

    Best Regards, Lloyd Borrett
    Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42

  2. #2
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Cleaning Up User Input

    Some here

    PO Box Ban (requires modification)
    https://www.zen-cart.com/downloads.php?do=file&id=724

    Captialize Sign-up Fields
    https://www.zen-cart.com/downloads.php?do=file&id=295

    Company Name after Customer Name (requires modification)
    https://www.zen-cart.com/downloads.php?do=file&id=2019

    Telephone/postcode numbers etc can be formated using HTML (see w3s telephone number)

    Google
    site:www.zen-cart.com plugins whatever

 

 

Similar Threads

  1. User Input Pricing?
    By cPappas91 in forum General Questions
    Replies: 5
    Last Post: 16 Nov 2010, 06:19 PM
  2. Customizeing User Input
    By dwardlow in forum General Questions
    Replies: 0
    Last Post: 3 Sep 2009, 10:03 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR