1.3.9h
........now, if I could just get my Media Mail check back into the usps.php file again, I'd be a happy camper.........
is there something about this code which now needs to be altered?
// bof: Media Check
// test contents for Media Mail
$skip_media = false;
$chk_media = 0;
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','10');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','25');
if ($chk_media != $_SESSION['cart']->count_contents()) {
$skip_media = true;
}
//echo '<br>IN USPS I SEE ' . $chk_media . ' count: ' . $_SESSION['cart']->count_contents() . ' Skip Media: ' . ($skip_media == true ? 'YES' : 'NO') . '<br>';
$methods = array();
$size = sizeof($uspsQuote);
for ($i=0; $i<$size; $i++) {
list($type, $cost) = each($uspsQuote[$i]);
// BOF: UPS USPS
$title = ((isset($this->types[$type])) ? $this->types[$type] : $type);
if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS))) $title .= $transittime[$type];
/*
$methods[] = array('id' => $type,
'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type),
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
*/
if ($type == 'MEDIA' && $skip_media) {
// skip Media Mail
} else {
$cost = preg_replace('/[^0-9.]/', '', $cost);
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );
}
}
// bof: Media Check
that code worked fine with the old file, but not-so-hot with the new one........
(thank you)
maybe my placement was just wrong? I placed it just ahead of
// fix new trademark and reg 01-02-2011