Contributions

Features (Category Index)
Search: 

Capitalize First Letter for Create Account Fields

This may be the simplest contribution ever. Many of our customers were to lazy to capitalize the first letter of the following fields :

First Name
Last Name
City
Business Name
Street Address

This drove me crazy, so, I fixed this for them on the fly using the ucwords() function.

-------------------

Example from create_account.php

To capitalize the first letter of the "first name" field:

FIND :

$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);

CHANGE TO :

$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$firstname = ucwords($firstname);

------------

Done! Simply do that for any field you wish to capitalize for your customers.

Expand All / Collapse All

Detailed info on how to do it 14 Jun 2010

I tried to explain the easier as possible how to capitalize the names, surnames and addresses of the new customers when they register like "MICHAEL DOE", how to avoid this changing it to "Michael Doe", and also how to do that for the previously registered customers.

The file is a plain TXT file with detailed instructions.

By fightsol.com

vans macs mcs etc. 6 Sep 2007
Complete Update of User Input and Edit Files 5 Sep 2007
On edit 5 Sep 2007
Last name also 2 Sep 2007
Change to Lower Case Then Capitalize First Letter 2 Sep 2007
Capitalize First Letter for Create Account Fields 22 Jul 2007

Note: Contributions are used at own risk.