What does this contrib do?
Like the title says... cleans up the sloppy inputted words by customers on their registration, edit account etc. I also added a all lowercase for the email strings.
explain sloppy input?
OK, new customer creates a new account as:
JOHN DoEskY
123 noWHERe ave.
canton, NY 12345
email: BIGred@AOL.com
this will be cleaned (and stored in your db) and displayed on all invoices/screen info-text as:
John Doesky
123 Nowhere Ave.
Canton, NY 12345
email: bigred@aol.com
I also added exception words (you can add or remove these exception words to your liking!)
i.e.
"PO" for PO Box 1234 (allowing a capital "O" after the capital "P")
"IV" for John Doe IV (instead of John Doe Iv)
"RR 2" for Rural Route 2 (instead of Rr 2)
------------------------------------------
So unlike a simple ucfirst() command which just changes the 1st letter but leaves the rest of the line alone, this code will capitalize the 1st letter of every word and of course leaves out the words you input in the exception fields! (note: there is two fields, lower case and upper case exceptions).
------------------------------------------
Legend: 
Download

Report
Below statement and revision is a duplicate call, it is already in and you would be just adding the call twice! **Do not use last upload by Magician**
This uploaded file set is back to the correct revision.
In the
catalog/checkout_payment_address.php
It was missing this code.
#### FIND:
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT_ADDRESS);
#### JUST BELOW ADD:
include_once('includes/functions/' . FILENAME_ACCOUNT_WORD_CLEANER);
*Complete Pkg*
v1.4 now has newly added separate functions for Last Name and Company Name fields. This results in using the "Mc" and "Mac"
prefixes only in the Last name field -and- company initials only as CAPS in the company input field like... IBM or GM etc.
(the function file is now documented (//remarked) so you can edit the exceptions, prefixes, suffixes along with the company initials you would like to allow like "ABC Cleaners" "BB King CD Collections" "XXX Bookstore Inc." etc, etc... all to your exact liking :)
Prior versions cleaned text example...
Zz Top Tee Shirt Co.
John MacDonald
12 MacAroni Lane
MacKy, TX 12345
v1.4+ cleaned text example...
ZZ Top Tee Shirt Co.
John MacDonald
12 Macaroni Lane
Macky, TX 12345
**********************
Support/Development Forum Thread:
http://forums.oscommerce.com/index.php?showtopic=283278
*Complete Pkg w/ newly added exceptions*
=== All new function file with these new features ===
1. Accounts for (-) in names (smith-barney = Smith-Barney)
2. Accounts for (') in names (l'esteral = L'Esteral) [see suffix* feature 4.]
3. Now accounts for multiple surnames as a prefix code like Mc, Mac. (MCWILLIAMS = McWilliams)
4. *New suffix coding allows for ('S) on the end of words (mcdonald's or MCDONALD'S = McDonald's)
...without this addition the above addition (feature 2.) would make (word's = Word'S) so this was much needed.
5. Acoounts for non-English names (De La = de la, De Las = de las, Der = der, Van De = van de, Van Der = van der, Von = von
------------------------------------------
Support/Development Forum Thread: http://forums.oscommerce.com/index.php?showtopic=283278
-------------------------------------------------------------
Existing v1.2 Users? Simple Upgrade:
--> UPLOAD NEW catalog/includes/functions/account_word_cleaner.php
Done!!!
Any problems or comments please post them on the Support Thread!
http://forums.oscommerce.com/index.php?showtopic=283278
-KJ Miller (top_speed)
www.gokartsRus.com
*Complete Pkg*
=== All new function file with these new features ===
1. Accounts for (-) in names (smith-barney = Smith-Barney)
2. Accounts for (') in names (l'esteral = L'Esteral) [see suffix* feature 4.]
3. Now accounts for multiple surnames as a prefix code like Mc, Mac, Dis, Da etc. (MCWILLIAMS = McWilliams, Disbennett = DisBennett, defelice = DeFelice, DASHAWN = DaShawn)
4. *New suffix coding allows for ('S) on the end of words (mcdonald's or MCDONALD'S = McDonald's)
...without this addition the above addition (feature 2.) would make (word's = Word'S) so this was much needed.
5. Acoounts for non-English names (De La = de la, De Las = de las, Der = der, Van De = van de, Van Der = vander, Von = von
------------------------------------------
Support/Development Forum Thread: http://forums.oscommerce.com/index.php?showtopic=283278
-------------------------------------------------------------
Existing v1.2 Users? Simple Upgrade:
--> UPLOAD NEW catalog/includes/functions/account_word_cleaner.php
Done!!!
Any problems or comments please post them on the Support Thread!
http://forums.oscommerce.com/index.php?showtopic=283278
-KJ Miller (top_speed)
www.gokartsRus.com
*Complete Pkg*
=== All new function file with these new features ===
1. Accounts for (-) in names (smith-barney = Smith-Barney)
2. Accounts for (') in names (l'esteral = L'Esteral) [see suffix* feature 4.]
3. Now accounts for multiple surnames as a prefix code like Mc, Mac, Dis, Da etc. (MCWILLIAMS = McWilliams, Disbennett = DisBennett, defelice = DeFelice, DASHAWN = DaShawn)
4. *New suffix coding allows for ('S) on the end of words (mcdonald's or MCDONALD'S = McDonald's)
...without this addition the above addition (feature 2.) would make (word's = Word'S) so this was much needed.
5. Acoounts for non-English names (De La = de la, De Las = de las, Der = der, Van De = van de, Van Der = vander, Von = von
------------------------------------------
Support/Development Forum Thread: http://forums.oscommerce.com/index.php?showtopic=283278
-------------------------------------------------------------
Existing v1.2 Users? Simple Upgrade:
--> UPLOAD NEW catalog/includes/functions/account_word_cleaner.php
Done!!!
Any problems or comments please post them on the Support Thread!
http://forums.oscommerce.com/index.php?showtopic=283278
-KJ Miller (top_speed)
www.gokartsRus.com
*Complete Pkg*
Feedback has been very positive, contrib seems very stable in all osC versions and now this contrib is very easy to install 5-10 mins!
(same as last upload but with upgrade instructs for prior versions)
Support & Development Thread: http://forums.oscommerce.com/index.php?showtopic=283278
Easier install, less line edits. Files are a tad larger now but it is way more easy to install now, special thanks to bob61!
Support & Development Thread: http://forums.oscommerce.com/index.php?showtopic=283278
Some may have encountered this...
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
This full pkg addresses and fixes it.
Current users, re-upload catalog/includes/functions/account_word_cleaner.php from this pkg.
Complete Pkg.
v1.21 ->
1. Added an "ALL CAPS" input for the postcode. Mostly for Canadian, Mexican & Europeon shops that may have alpha/numeric ZIP or Postal codes entered in by customers as: 1rf h265 (hehe)...they will now be reformatted correctly as: 1RF H265
note: This is fine for any US only shops as well, it won't hurt the all numeric entries like 90210
2. Updated with a few more exceptions: catalog/includes/functions/account_word_cleaner.php
Support & Development Thread: http://forums.oscommerce.com/index.php?showtopic=283278
1. Changed call function file, not a shared file anymore, contrib has it's own now!
2. Added exception names (& works on street names also) to be included as McNabb, MacDermitt, McDonald etc. So if a customer types in their name correctly, it will keep it as such and won't try to change it back to lower case after the first upper case letter.
3. Added a define that I think some were missing b/c they didn't have the account_validation file originally (now the contrib uses account_word_cleaner.php) and the instructs define the file in filenames.php
4. cleaned instructions
5. added a upgrade txt file
A new install.txt-file because the old one was a little to complicated.
Also added the changes of create_account.php in this file.
Complete package
Full Pkg.
1. Added notes to edit lines that some osC snapshots may not include all edit lines shown. Simply omit the edit-in lines that you do not have included in your osC version combined with your prior contribution-modifications.
note: STS may leave quite a few of the input fields out so just go to the next edit-in line!!
2. corrected a couple of firstnames edit-ins that should have been lastnames edit-ins.
http://forums.oscommerce.com/index.php?showtopic=283278
This minor version:
1. Added account_validation file for users who didn't have an existing catalog/includes/functions/account_validation.php
2. Updated install.txt , cleaned it up and made it easier to follow
3. Corrected support thread within install.txt (THANKS GUYS!) I guess it was a long day!
http://forums.oscommerce.com/index.php?showtopic=283278
here's the forum link:
http://forums.oscommerce.com/index.php?showtopic=283278
just added this link, no code has been changed
Thanks for the great contrib, but all that you added was a link to this page. Not a link to a Development/Support Thread.
Just added a Development/Support Thread to install.txt
http://addons.oscommerce.com/info/5550
What does this contrib do?
Like the title says... cleans up the sloppy inputted words by customers on their registration, edit account etc. I also added a all lowercase for the email strings.
explain sloppy input?
OK, new customer creates a new account as:
JOHN DoEskY
123 noWHERe ave.
canton, NY 12345
email: BIGred@AOL.com
this will be cleaned (and stored in your db) and displayed on all invoices/screen info-text as:
John Doesky
123 Nowhere Ave.
Canton, NY 12345
email: bigred@aol.com
I also added exception words (you can add or remove these exception words to your liking!)
i.e.
"PO" for PO Box 1234 (allowing a capital "O" after the capital "P")
"IV" for John Doe IV (instead of John Doe Iv)
"RR 2" for Rural Route 2 (instead of Rr 2)
------------------------------------------
So unlike a simple ucfirst() command which just changes the 1st letter but leaves the rest of the line alone, this code will capitalize the 1st letter of every word and of course leaves out the words you input in the exception fields! (note: there is two fields, lower case and upper case exceptions).
------------------------------------------