-
USPS Question
Hey guys,
I just have one quick question!
I made a store for someone in the US and I'm located in Ireland. They use UPS for all US orders and USPS for everyone else. When I check how much it is to ship to Ireland its always $25.95 no matter what weight. This is using flat rate envelope. Is this due to zen-cart knowing if they'll actually fit. If so should I disable using this carrier method?
Thanks!
-
Re: USPS Question
That is the same quote USPS gives ... up to about 65 or so pounds ...
However, there is nothing in Zen Cart to manage dimensions ... so that can be an issue ...
-
Re: USPS Question
Thanks for the reply Linda! (nice irish name btw :smile: )
Just one more question. Is there any code I can add to the usps module that checks if there is a product from I.D 11 and 12 (in my case) and automatically gets rid of Express Mail International flat rate envelope from the list of available shipping methods?
I tried one from this site but it didnt work.
Thanks a million!
-
Re: USPS Question
A products_id 11 and 12 or something from a categories_id 11 and 12 and if a categories_id are those the master_categories_id?
-
Re: USPS Question
It's the top categories.
http://img96.imageshack.us/img96/6953/65440192.jpg
Here's a picture to help!
Thanks
-
Re: USPS Question
You would add the code to:
Code:
$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);
*/
global $cart;
// $chk_cats = $_SESSION['cart']->in_cart_check('master_categories_id','11') + $_SESSION['cart']->in_cart_check('master_categories_id','12');
echo 'shipping ' . $type . ' chk_cats: ' . $chk_cats . '<br>';
if ($type == 'Express Mail International (EMS) Flat-Rate Envelope' && $chk_cats > 0) {
// skip shipping
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}
}
The commented echo is if you need to see the name of the shipping type for testing other settings ... just uncomment and it will display on the shipping ... note: it will look pretty ugly but it is helpful ... :smile:
-
Re: USPS Question
I'm a PHP retard so excuse the stupidity! When I put the code into usps.php this came up on top of the site.
shipping Global Express Guaranteed chk_cats:
shipping Express Mail International (EMS) chk_cats:
shipping Express Mail International (EMS) Flat-Rate Envelope chk_cats:
shipping Priority Mail International chk_cats:
shipping Priority Mail International Flat-Rate Envelope chk_cats:
shipping First Class Mail International Large Envelope chk_cats:
I thought it only comes up if I remove the // from the code?
Thanks again!
-
Re: USPS Question
sorry ... that was me ... :blink:
change where the // comment mark is ... silly me ... :cool:
Code:
$chk_cats = $_SESSION['cart']->in_cart_check('master_categories_id','11') + $_SESSION['cart']->in_cart_check('master_categories_id','12');
// echo 'shipping ' . $type . ' chk_cats: ' . $chk_cats . '<br>';
-
Re: USPS Question
Thanks for this Ajeh.
Just one more question. The code is fine the way it is but is there any way to get rid of Express Mail International (EMS) Flat-Rate Envelope and Priority Mail International Flat-Rate Envelope for all products in ID 11 and 12 like the photo and First Class Mail International Package for ID 42 (when click ID 11) and ID 43 when you click ID 12?
Hope I make sense!
Thanks a million for all your help!!!!
-
Re: USPS Question
Instead of master_categories_id check for products_id ...