Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

APO/FPO Shipping Fix. Does this look OK? Comments?


rotaour

Recommended Posts

Posted

It was recently brought to my attention that customers from APO/FPO's were not able to complete checkout as UPS does not ship to APO/FPO's and we only offer UPS shipping. We do, however, want to offer USPS shipping to those folks in APO/FPO's. We have about 20 customers that have signed up since we went live with our stores 7 months ago and only three of those have placed orders. Those that did had items shipped to their home addresses in the states.

 

Here's what I came up with and it seems to work on my testing store. Anybody see any issues with this? Seems OK to me, but I havent put a lot of thought into it. Please, let me know what you think.

 

I've enabled UPS and USPS shipping. Note: USPS shipping requires an account with USPS. At the time that I installed it(4-5 months ago and we never ended up offering USPS) the account had to be upgraded to a 'production' account as the testing accounts did not function properly. You will find this info in the contrib. Im using 1.47 2003/04/08, but I'm certain there are updates as I have a newer version in my contribs folder where I download possible upgrades to. So the production vs. testing server issues may have been worked out, I dont know, I havent had the time to look into it, but will eventually.

 

APO/FPO zones & ids in TABLE_ZONES:

id 6 - AF

id 7 - AA

id 8 - AC

id 9 - AE

id 10 - AM

id 11 - AP

 

On includes/modules/shipping/ups.php after function ups()(line 45) I've added;

//////////////////////////////////////// DISABLE UPS FOR APO/FPO ADRESSES ////////////////////////////////////////////////

$apofpo=array(6, 7, 8, 9, 10, 11);

if (in_array($order->delivery['zone_id'], $apofpo)) {

$this->enabled = false;

}

//////////////////////////////////////// DISABLE UPS FOR APO/FPO ADRESSES ////////////////////////////////////////////////

This eliminates the UPS error and the UPS ship option altogether for APO/FPO addresses.

 

On includes/modules/shipping/usps.php after function usps()(line 45) I've added:

//////////////////////////////////////// DISABLE USPS FOR NON APO/FPO ADRESSES ////////////////////////////////////////////////

$apofpo=array(6, 7, 8, 9, 10, 11);

if (!in_array($order->delivery['zone_id'], $apofpo)) {

$this->enabled = false;

}

//////////////////////////////////////// DISABLE USPS FOR NON APO/FPO ADRESSES ////////////////////////////////////////////////

This eliminates the USPS ship option altogether for NON APO/FPO addresses.

 

Note: According to http://www.oconus.com/ZipCodes.asp the only valid APO/FPO addresses are AA, AE & AP, so AF, AC and AM do not need to be in the apofpo array. I'm not really sure why ther're in the TABLE_ZONES at all.

 

Anyway, thats about it. Hope this will help someone and that its usable. Please let me know if you see any problems with it.

 

Matt

Matt Mika

Installed Contributions: Multi-Stores, QTPro, CCGV(trad), Batch Print, EasyPopulate, Simple Manual Order Entry, Encrypting Credit Card Via Mcrypt, UPSXML, Down for Maintenance, On The Fly GD Thumbs, SPPC, SPPC Hide, and various personal tweaks

  • 2 years later...
Posted

I know this is an old post , but I am curious did it work out properly. I am having trouble getting UPS and USPS to work correctly together.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...