Well, re-installing the USPS.php didn't help. In fact, I further learned that a person creating a new account can't get past the shipping information page during checkout.
So — just to share, I changed this:
Code:
// use USPS translations for US shops
var $usps_countries;
function usps() {
global $order, $db, $template, $current_page_base;
$this->code = 'usps';
$this->title = MODULE_SHIPPING_USPS_TEXT_TITLE;
if (MODULE_SHIPPING_USPS_STATUS == 'True' && MODULE_SHIPPING_USPS_DEBUG_MODE != 'Off' && IS_ADMIN_FLAG) {
$this->title .= '<span class="alert"> (Debug is ON: ' . MODULE_SHIPPING_USPS_DEBUG_MODE . ')</span>';
}
if (MODULE_SHIPPING_USPS_STATUS == 'True' && MODULE_SHIPPING_USPS_SERVER != 'production' && IS_ADMIN_FLAG) {
$this->title .= '<span class="alert"> (USPS Server set to: ' . MODULE_SHIPPING_USPS_SERVER . ')</span>';
}
$this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER;
$this->icon = $template->get_template_dir('shipping_usps.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'shipping_usps.gif';
$this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS;
$this->tax_basis = MODULE_SHIPPING_USPS_TAX_BASIS;
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
}
TO THIS
Code:
// use USPS translations for US shops
var $usps_countries;
function usps() {
global $db, $order, $cart;
$valid_zone_id = 2;
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . $valid_zone_id . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == true) {
$this->enabled = false;
} else {
$this->enabled = true;
}
and although it returns quotes in the shipping estimator for international orders, it appears the modified code 'breaks' something. Although I'm not sure how, we do use the COWOA module here, so perhaps there's a conflict, but I can't see how this aspect of the USPS.php could impact it.
Bookmarks