You need to add the zone_code on the select for shipping:
Code:
$shipping_address_query = "select ab.entry_firstname, ab.entry_lastname, ab.entry_company,
ab.entry_street_address, ab.entry_suburb, ab.entry_postcode,
ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id,
c.countries_id, c.countries_name, c.countries_iso_code_2,
c.countries_iso_code_3, c.address_format_id, ab.entry_state,
z.zone_code
from " . TABLE_ADDRESS_BOOK . " ab
left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id)
left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id)
where ab.customers_id = '" . (int)$_SESSION['customer_id'] . "'
and ab.address_book_id = '" . (int)$_SESSION['sendto'] . "'";
The you can try to use it on the build of the delivery:
Code:
$this->delivery = array('firstname' => $shipping_address->fields['entry_firstname'],
'lastname' => $shipping_address->fields['entry_lastname'],
'company' => $shipping_address->fields['entry_company'],
'street_address' => $shipping_address->fields['entry_street_address'],
'suburb' => $shipping_address->fields['entry_suburb'],
'city' => $shipping_address->fields['entry_city'],
'postcode' => $shipping_address->fields['entry_postcode'],
'state' => ((zen_not_null($shipping_address->fields['zone_code'])) ? $shipping_address->fields['zone_code'] : $shipping_address->fields['zone_name']),
'zone_id' => $shipping_address->fields['entry_zone_id'],
'country' => array('id' => $shipping_address->fields['countries_id'], 'title' => $shipping_address->fields['countries_name'], 'iso_code_2' => $shipping_address->fields['countries_iso_code_2'], 'iso_code_3' => $shipping_address->fields['countries_iso_code_3']),
'country_id' => $shipping_address->fields['entry_country_id'],
'format_id' => (int)$shipping_address->fields['address_format_id']);
And test if this can work for you ...
I have not tested it on everything so you really want to test this change ...