3 replies [Last post]
Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Was this information Helpful?

Is there any way we can actually get the country/province/state options to show up with their actual abbreviations instead of these numbers that show up in the checkout process:

...
<option value="67">British Columbia</option>
<option value="68">Manitoba</option>
...

just so I can pass these on to my merchant properly without the confusing # values...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Country/Province/State option customizing...

Using the ID helps the current system of tracking countries/zones. However, there is a helper function that will return the abbreviation based on the ID:

<?php
  $abbr
= uc_get_zone_code($zone_id);
?>
Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Re: Re: Country/Province/State option customizing...

so wait, would a simple change like this (line 2178 in uc_store.module):

FROM:

$options[$zone->zone_id] = ($display == 'code') ? $zone->zone_code : $zone->zone_name;

TO

$options[$zone->zone_code] = ($display == 'code') ? $zone->zone_code : $zone->zone_name;

change anything significantly in terms of order tracking, in the core functionality of ubercart?

if not, I'll just go with this modification for now...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Country/Province/State option customizing...

It wouldn't work, because the field for zones in the database expects an integer not a string. Also, all the submit functions are looking for integers I believe...