Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Capital Letters in address book

Capital Letters in address book

Locked

Views: 3,224

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
27 Nov 2008, 8:27 PM
#1
confused_aswell avatar

confused_aswell

Zen Follower

Join Date:
Apr 2008
Location:
UK
Posts:
315
Plugin Contributions:
1

Capital Letters in address book

Hi

Is it possible to create a css command to convert the first letter of a name and anaddress into a capital letter? It's just a lot of people write their names and addresses in lower-case.

Thanks,

Phil

27 Nov 2008, 8:34 PM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Capital Letters in address book

confused_aswell:

Hi

Is it possible to create a css command to convert the first letter of a name and anaddress into a capital letter? It's just a lot of people write their names and addresses in lower-case.

Thanks,

Phil

Yes, you can edit your stylesheet.css
or check this out

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=441

27 Nov 2008, 8:39 PM
#3
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Capital Letters in address book

confused_aswell:

Hi

Is it possible to create a css command to convert the first letter of a name and anaddress into a capital letter? It's just a lot of people write their names and addresses in lower-case.

Thanks,

Phil

As,
In your_template/ stylesheet.css

Add this following declaration:

#company, #firstname, #lastname, #street-address, #suburb, #city, #contactname, #to-name {
text-transform: capitalize;
}

27 Nov 2008, 8:58 PM
#4
confused_aswell avatar

confused_aswell

Zen Follower

Join Date:
Apr 2008
Location:
UK
Posts:
315
Plugin Contributions:
1

Re: Capital Letters in address book

HI

Thanks very much, I installed the mod - Great Job!

Phil

27 Nov 2008, 9:12 PM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Capital Letters in address book

confused_aswell:

HI

Thanks very much, I installed the mod - Great Job!

Phil

As,
How is the mod???
Notice the version is 1.3.5
Does she work in 1.3.8a??????

Glad I could assist you....

10 Feb 2009, 5:59 AM
#6
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Capital Letters in address book

Helpful bit of info - I noticed that the State field was not included in that declaration. Here is the declaration with state as well:

#company, #firstname, #lastname, #street-address, #suburb, #city, #state, #contactname, #to-name {
text-transform: capitalize;
}

10 Feb 2009, 1:46 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Capital Letters in address book

Note that the mod changes certain letters to uppercase before the form is submitted, so the result is stored in your database as you wish. But using the CSS style is only an appearance fix; the info in your database is not changed in any way.

Rob

10 Feb 2009, 2:09 PM
#8
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Capital Letters in address book

Hmmm... Thanks for pointing that out! The mod it is!

10 Feb 2009, 2:31 PM
#9
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Capital Letters in address book

haredo:

As,
How is the mod???
Notice the version is 1.3.5
Does she work in 1.3.8a??????

Glad I could assist you....

FYI - I am running Zen 1.3.8a and this mod seems to run like a charm, despite the version

8 Apr 2010, 8:31 PM
#10
janellez avatar

janellez

Zen Follower

Join Date:
Sep 2007
Posts:
128
Plugin Contributions:
0

Re: Capital Letters in address book

Can anyone tell me how to maybe edit this mod so that ALL the input is in caps? Yes, I know many are against this, but my customer wants it because of a separate accounting package that requires this type of input.

Thanks!

9 Apr 2010, 9:09 AM
#11
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Capital Letters in address book

janellez:

Can anyone tell me how to maybe edit this mod so that ALL the input is in caps? Yes, I know many are against this, but my customer wants it because of a separate accounting package that requires this type of input.

Thanks!

This is very easy...

For each input field you will see a bit of script:

onchange="capitalize(this,1)

Change the 1 to 0

onchange="capitalize(this,0)

7 Jun 2010, 8:07 PM
#12
janellez avatar

janellez

Zen Follower

Join Date:
Sep 2007
Posts:
128
Plugin Contributions:
0

Re: Capital Letters in address book

schoolboy:

This is very easy...

For each input field you will see a bit of script:

onchange="capitalize(this,1)

Change the 1 to 0

onchange="capitalize(this,0)

Schoolboy, thanks so much! I honestly forgot about this thread and I really should have checked back sooner.

I do have another question. This works perfectly when a person is signing up but if they go in and change their primary address, say, in the Address Book, this capitalization functionality isn't there. If I was going to add it to the whole Address Book functionality, can you point me to the file I would change?

Thanks so much!

7 Jun 2010, 8:35 PM
#13
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Capital Letters in address book

Ok,
You will notice the mod "Capitalization" changes the .php coding in this file... > includes/ templates/ template_defaults/ template/ tpl_modules_create_account.php

So just use logic to compare how they have coded the capitalization into field names..

This is the file you will edit... Make sure you use the override system..

includes/ templates/ template_defaults/ template/ tpl_modules_address_book_details

Make sure you place this file here before editing..

includes/ templates/ your_template/ template/ tpl_modules_address_book_details