Shipping Database Values

Posts: 75
Joined: 01/25/2008

I am wondering where I should be pulling the ship-to fields for an order from. I am importing them into UPS WorldShip, and FedEx ShipManager. I see uc_orders but the values come into the programs as numerical values instead of the country or State. Is there an easier way to do it? Do I have to use some kind of lookup function?

Posts: 2102
Joined: 08/07/2007
AdministratoreLiTe!

Yes, lookup functions are what you need. Here is an example from the UPS module:

<?php
  $shipper_zone
= uc_get_zone_code($store['zone']);
 
$shipper_country = uc_get_country_data(array('country_id' => $store['country']));
 
$shipper_country = $shipper_country[0]['country_iso_code_2'];
?>

Posts: 75
Joined: 01/25/2008

Thanks Lyle,

I found information on WorldShip Foreign Key Relationships. Basically i just have to point and click to relate fields and tables to each other.