Now I have NO shipping estimator....could I PLEASE send you my WHOLE php file via PM? I am really trying to put the code EXACTLY where it is supposed to go and I really believe that I am...but obviously, something is wrong!![]()
Now I have NO shipping estimator....could I PLEASE send you my WHOLE php file via PM? I am really trying to put the code EXACTLY where it is supposed to go and I really believe that I am...but obviously, something is wrong!![]()
Try this file and see if it works when copied to the:
/includes/modules/shipping
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
HALLELUJAH!!!!!! It works now! So do you think I just wasn't pasting the code exactly where it should have gone? I tried so hard to get it right!Thank you for sticking it out with me and I'm sorry if I was frustrating....I certainly didn't mean to be! This is all so above and beyond my abilities!
You're my hero!
Thanks again!
From the code I did see you post you kept leaving out the IF around the final cost build:
That was to skip the media when it was suppose to be skipped and add the methods when it wasn't ...Code: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) ); }![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Well, thank you again! I am very grateful for your help!![]()
Not a problem ... good luck with your shop!![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I used the zip file from the post above and it works in the cart for checkout purposes, however the shipping estimator now displays only blank boxes where the rates are supposed to be.
Running v1.3.8 and here's a copy of the modified section of my usps.php file
Any suggestions are welcomed and appreciated.PHP Code:// BOF: UPS USPS
$this->quotes = array('id' => $this->code,
'module' => $this->title . $show_box_weight);
// EOF: UPS USPS
// bof: Media Check
// test contents for Media Mail
$skip_media = false;
$chk_media = 0;
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','107');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','110');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','130');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','301');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','116');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','103');
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
$this->quotes['methods'] = $methods;
if ($this->tax_class > 0) {
$this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
Zencart ROCKS!
Have you an URL to where you are using this ... I am not able to reproduce an issue such as what you are describing and it might help if we could peek at the problem ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Give me a hint ... who is a media mail product you are using SEO junk and I get lost ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!