View Full Version : Two letter format?
gtroll
September 11th, 2002, 11:47 PM
US States and Canadian Provinces should be two letter format. All shipping agents use this. Can we possibly use this format? It might make shipping integration easier.
Jamie
September 12th, 2002, 12:51 PM
You can get the abbreviation to use in certain files. For payment gateways, you can get it as follows:
$order['Ship_Addr']['State_Abbrev']
$order['Bill_Addr']['State_Abbrev']
for other files (templates, etc...) you should be able to get the info via:
$SESSION['order']['Ship_Addr']['State_Abbrev']
$SESSION['order']['Bill_Addr']['State_Abbrev']
Obviously, the info is only available after the customer choses their state. There is no way to currently display the states to the customer on the shipping and billing address forms as abbreviations. We could make this an option in the future.
gtroll
September 12th, 2002, 06:30 PM
1. So on the order_confirmation_email.php template I would change
<?=$Billing_State_or_Province?>
to
<?=$order['Bill_Addr']['State_Abbrev']?>
or
<?=$SESSION['order']['Bill_Addr']['State_Abbrev']?>
or
<?=$Billing_State_or_Province['Bill_Addr']['State_Abbrev']?>
which if any of the above are correct?
2. [quote:fba303d4a2]Obviously, the info is only available after the customer choses their state. There is no way to currently display the states to the customer on the shipping and billing address forms as abbreviations. We could make this an option in the future.[/quote:fba303d4a2]
That would not be neccesary to display them as abbreviations only store them as. I was more looking at the orders table and wanting to sort by state, city, etc for reports done though MYSQL and PHP. I didn't notice the states table so one could look up the abbreviation from that table...
Jamie
September 13th, 2002, 03:40 PM
Your 1st and 2nd example should work (definitely the 2nd!).
[quote:ec3b277393]That would not be neccesary to display them as abbreviations only store them as. I was more looking at the orders table and wanting to sort by state, city, etc for reports done though MYSQL and PHP. I didn't notice the states table so one could look up the abbreviation from that table...[/quote:ec3b277393]
I know what you mean. We will work on getting this done as part of getting the order control system in place (viewing orders, updating them, etc...)
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.