VM 3.0.14
Joomla 2.5
PHP 5.4
In my shopping cart I would like to have the "state" field displayed only as a 2-letter instead of the full name
I have tried inserting a new userfield named state_2_code (which sould be the name of the field) but no luck ...
is there some simple config to show 2 letter state ???
You could edit the State Names to just the 2 letters if you wish. But I suspect it would need redoing after each VM update.
well, i was hoping for a simpler option...
so far I managed thru code, I had to hack a little the "default_address.php" file under the cart view:
<?php if ($item['name'] == 'virtuemart_state_id') {?>
<span class="values<?php echo '-' . $item['name'] ?>"><?php echo "(".$item['state_2_code'].")";?></span>
<?php
}
else
{
?>
<span class="values<?php echo '-' . $item['name'] ?>"><?php echo $item['value'];?></span>
<?php
}
?>
see pic:
There is a function to get the state 2 code. Somewhere in shopfunctions