Zen Cart Logo
Forums / Basic Configuration / Customer information with uppercase on first letter

Customer information with uppercase on first letter

Locked

Views: 2,913

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
8 Jun 2006, 3:33 PM
#1
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Customer information with uppercase on first letter

Hi all!

Is there an easy way to make the customer information appear with uppercase on the First Letter..?

Why I ask is because alot of customers don't seem to find the Shift button on their keyboards.

Most people probably wouldn't bother but I have an obsessive mind :P and IMO it looks very unprofessional shipping stuff with recipient info is all in lower case, therefor I always change it.

This is quite time consuming but it is something that has to be done according to me. Psycho :P

Thanks in advance!

Svanis

8 Jun 2006, 4:08 PM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Customer information with uppercase on first letter

You need use the php function ucwords(). This will captialise the first letter of every word for you.

You probably want to save yourself some time in the future, and place this alteration in the create account header. That way the names will be stored in the database as capitalised words.

The ucwords function uses the following syntax:

echo ucwords('firstname lastname'); // returns "Firstname Lastname"

Absolute

8 Jun 2006, 10:40 PM
#3
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Customer information with uppercase on first letter

Thank you for the fast reply.. :D

To the next question; for one who aren't that skilled with php.. Where should this be inserted?

Svanis

8 Jun 2006, 11:17 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: Customer information with uppercase on first letter

I think before you do that you might want to do a search for a thread in the archives- look for prettifier (?) - someone has made an addon that takes care of the names.

9 Jun 2006, 11:00 AM
#5
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Customer information with uppercase on first letter

Kim:

I think before you do that you might want to do a search for a thread in the archives- look for prettifier (?) - someone has made an addon that takes care of the names.
One thing is for sure; it is not named "prettifier".. Anyone who knows this contribs name?

9 Jun 2006, 11:33 AM
#6
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Customer information with uppercase on first letter

"Proper Case" by Speedy G
http://www.zen-cart.com/forum/showthread.php?t=30300

Follow the edits recommended by scrat and documented by yours truly in the same forum. The edits work fine in Zen Cart 1.3.0.1. Unsure how the code works for non-English languages.

Link to the latest version I am aware of:
http://www.mutualadvantage.co.uk/zen-cart/downloads/propercase-20060317a.zip

propercase-20060317a.zip is more recent than propercase-v1.0.1.zip. But I also understood in above thread that someone might be working on an update, which I have not observed any announcement.

Woody

27 Jun 2006, 10:23 PM
#7
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Customer information with uppercase on first letter

Thanks a bunch Woody!

It sure did the trick!

30 Jul 2006, 10:39 AM
#8
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Customer information with uppercase on first letter

Woodymon:

Unsure how the code works for non-English languages.
I can tell you that it isn't completely flawless when it comes to non-english letters. The first letter after any of swedish "å, ä or ö" is uppercased.

Anyone with a solution?

1 Aug 2006, 2:48 AM
#9
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Customer information with uppercase on first letter

Svanis:

I can tell you that it isn't completely flawless when it comes to non-english letters. The first letter after any of swedish "å, ä or ö" is uppercased.

Anyone with a solution?

Look in the archived thread for Proper Case. A few folks announced some potential workarounds.