Converting Customer and Shipping Info to Proper Case

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Converting Customer and Shipping Info to Proper Case

Post by AlanW » Tue May 26, 2009 11:24 am

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

User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

Re: Converting Customer and Shipping Info to Proper Case

Post by ryanstowasser » Tue May 26, 2009 12:21 pm

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.

AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Re: Converting Customer and Shipping Info to Proper Case

Post by AlanW » Tue May 26, 2009 12:51 pm

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

User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

Re: Converting Customer and Shipping Info to Proper Case

Post by ryanstowasser » Tue May 26, 2009 2:28 pm

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>

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: Converting Customer and Shipping Info to Proper Case

Post by ZLA » Tue May 26, 2009 3:08 pm

Another option is to use a SQL trigger on the relevant tables to change the values when saved.

Post Reply