Page 1 of 1

Converting Customer and Shipping Info to Proper Case

Posted: Tue May 26, 2009 11:24 am
by AlanW
Shipping Address CITY, STATE, COUNTRY is converted to Upper Case even if the customer entered their information in lower case. In our previous shopping cart, we had to manually change lower case and Upper Case to proper case if we wanted to keep things looking neat on the orders. That was annoying but acceptable since a single change to the customer's record changed it on all the shipments and paperwork.

In AC, we have to manually change the information in the customer's profile and also edit the shipping and billing address if we want to see proper case to be changed on all the paperwork. Not going to happen.

Has anyone found a way to automatically force proper case or Upper Case when the customer enters their information in all lower case or upper case? Since AC does this for City STATE COUNTRY, might there be a way to also update case for other fields?

Thanks,

Alan

Re: Converting Customer and Shipping Info to Proper Case

Posted: Tue May 26, 2009 12:21 pm
by ryanstowasser
Try using CSS. The css below will capitalize the first letter of each word.

.capitalize
{
text-transform: capitalize;
}

just apply the .capitalize class to all the places where name, state, and country are displayed.

Re: Converting Customer and Shipping Info to Proper Case

Posted: Tue May 26, 2009 12:51 pm
by AlanW
Thanks Ryan.

That sounds promising. Where should I apply the .capitalize class....in the master style sheet or directly to pages that collect customer information?

--Alan

Re: Converting Customer and Shipping Info to Proper Case

Posted: Tue May 26, 2009 2:28 pm
by ryanstowasser
Add the css class to the master stylesheet, then apply the class to the pages where you want to change the text.

Add this to the stylesheet.

Code: Select all

.capitalize
{ 
text-transform: capitalize; 
}
Then in your page you can add the stylesheet class like:

Code: Select all

<td class="address capitalize"> 
          Vortx<br />Ryan Stowasser<br />180 Lithia Way<br />Suite #202<br />ASHLAND  OR, 97520<br />UNITED STATES
</td>

Re: Converting Customer and Shipping Info to Proper Case

Posted: Tue May 26, 2009 3:08 pm
by ZLA
Another option is to use a SQL trigger on the relevant tables to change the values when saved.