In customer email and last step of checkout 2 digit code of State/Province/Region is shown instead of the name.
Example, for "Asturias" a Province in Spain, it show "33" instead of "Asturias".
(http://www.protechsystems.us/stuff/joomla/vm/vm-state_2_digit.png)
i have the same issue but still no solution :/
http://forum.virtuemart.net/index.php?topic=77017.0
This is by design. It is the accepted short form of the state / province / region. I understand that someone would like to customize it, but there is nothing to "fix" in the code.
Francesco,is not short form of the state but 2 digit number, how is one suppose to know what 33 means?
It is like a "plate" number. What i mean is, it is not a "Table ID". If you look at the jos_vm_state table, you'll see these fields:
state_id - country_id - state_name - state_3_code - state_2_code
e.g.
1 - 223 - Alabama - ALA - AL
For "Asturias", if you look at the table, it reports
326 - 195 - Asturias - AST - 33
So maybe someone in Spain DOES know that 33 stands for "Asturias". In Italy, if you write "BS" in an address, everyone knows it stands for "Brescia" province. Now, if data are wrong in the table, that's another matter.
Anyway, this can surely be discussed from an "usability" point of view, but it is definitely NOT a bug, so it won't be "fixed" in 1.1.x. Short time, 1.5 coming, blablabla... i hope you'll understand.
BTW, thank you again and again for your huge testing work.
Quote from: zanardi on November 06, 2010, 14:55:25 PM
This is by design. It is the accepted short form of the state / province / region. I understand that someone would like to customize it, but there is nothing to "fix" in the code.
if there is nothing to fix , is there a way to show the state_name instead of state_id?
Well, yes, and it is quite easy. You go to "Configuration" -> "Store" -> "Edit store" and modify your "Store" address format. This will be applied to your customer address format also.
OR, as an alternative, you edit templates/checkout/get_final_confirmation.tpl.php, assigning state_name value to state variable.
Quote from: zanardi on November 08, 2010, 13:32:46 PM
Well, yes, and it is quite easy. You go to "Configuration" -> "Store" -> "Edit store" and modify your "Store" address format. This will be applied to your customer address format also.
i have :
{storename}
{address_1}
{city}, {zip}
{phone} but i think this is for the address of my store that is shown in the confirmation mail, it has nothing to do with the state_id that appears instead of the state_name of customer info.
Quote from: zanardi on November 08, 2010, 13:32:46 PMOR, as an alternative, you edit templates/checkout/get_final_confirmation.tpl.php, assigning state_name value to state variable.
what should i edit here? this is for the last step before making the order?
/components/com_virtuemart/themes/Your template/templates/checkout/customer_info.tpl.php
Around line 55:
$db->p("state_2_code");
Change it to:
$db->p("state_name");
There are more places to change the code but don't know them, this will solve it just for the checkout.
btw I don't know from where are you but neither in Italy or Spain they use those number codes, we write the full name of the state.
I posted all the places this needs to be changed.
It is an annoying bug, have a look at the UK ones, nobody refers to wales as WS and would you know the SD is Scotland?
I should be a setting so you can decide, two letter codes only work in some places, USA being one I can think of.
It it is not a bug it should be a feature request then
The only code with common sense to have numbers is the zip code, no matter if you are in the USA or Europe.
Asturias should be Asturias and not 33 and Scotland should be Scotland and not SD.
EDIT= I just realised this is VM 1.1 discussion forum and I'm using VM 1.1.8 and have the same problem with states :o
Quote from: stinga on April 01, 2011, 15:43:03 PM
I posted all the places this needs to be changed....
Please, could you tell me where do you posted that list ?
Thanks
Search is your friend, I posted about it. and I have just found another location I missed.
I can't remember the post number.
This is a US centric look on the world where everyone (nearly) knows the US state codes, but fails nearly everywhere else in the world.
I did search the same day you posted that and I can't find where you wrote all that info, we still have those "USA" codes in our spanish shop, our transport company love them ;)
try this,
http://forum.virtuemart.net/index.php?topic=77017.msg258047#msg258047
It gives you an idea of what needs to be changed. I don't know where my original post went, or maybe I dreamt that I posted about it!