Forums / Addon Shipping Modules / USPS Shipping Module - No estimated transit time for International shipments

USPS Shipping Module - No estimated transit time for International shipments

Views: 4,595

Results 1 to 20 of 25
21 Oct 2013, 2:25 PM
#1
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

USPS Shipping Module - No estimated transit time for International shipments

Hi,

I use Ver. 2013-07-28 J5 of USPS Shipping Mod, and everything is working fine except the estimated transit time for the international shipments. When I switch the shipping address to domestic, the transit time shows right after each shipping methods, i.e. Priority Express, Priority Mail & First Class Mail. I just called the USPS tech support, but they weren't much of a help.

I run Zen Cart 1.3.9h in both English & Japanese with PHP 5.2.17 & MySQL 5.0.95. Any feedback would be appreciated.

Thank you,

21 Oct 2013, 5:51 PM
#2
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Hi again,

I just want to clarify the issue that I described above. Here is what I get for the domestic address:

Available Shipping Methods Rates
United States Postal Service (1 Boxes) (1 lbs, 7 oz) (Priority Mail™ (2 - 3 days)) $5
United States Postal Service (1 Boxes) (1 lbs, 7 oz) (Priority Mail Express™ (1 - 2 days)) $16
Store Pickup (Walk In) $0

For the international, the estimated transit time is missing for each service:

Available Shipping Methods Rates
United States Postal Service (1 Boxes) (1 lbs, 7 oz) (Priority Mail International®) $43
United States Postal Service (1 Boxes) (1 lbs, 7 oz) (Priority Mail Express International™) $56

Would that be possible to show the transit time for the international shipments as well?

Thank you for your input.

22 Oct 2013, 3:01 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Could you post your Ship To and Ship From and the directory /logs or /cache depending on your version of Zen Cart, v1.3.9h should be in /cache, can you Zip the log file that looks similar to:
SHIP_usps_Debug_YOUR_DATE_TIME_US_YOUR_ZIPCODE.log

Also, could you humor me and ...

Go to your Zen Cart Admin and go to Tools ... Developers Tool Kit ...

In the bottom input box enter:
usps.php

Then, select Catalog ... click SEARCH ...

What comes up on the lines for:

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!

22 Oct 2013, 3:36 AM
#4
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Ajeh,

Thank you so much for your reply.

Ship To is Japan and Ship From is Florida. Please see the search result below.

/includes/languages/english/modules/shipping/usps.php
Line #10 : * @version $Id: usps.php 2013-07-28 ajeh $ Version J 2013-07-28

/includes/modules/shipping/usps.php
Line #12 : * @version $Id: usps.php 2013-07-30 ajeh Version J5 $

I tried to locate the Debug log but couldn't find anything in /cache.

Thank you again for your assistance on this.

22 Oct 2013, 3:46 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Go to your Modules ... Shipping ... and hit EDIT on USPS and down at the bottom is a setting for DEBUG set this to Logs ... now they will generate for you when you try to get a quote from USPS ...

Later when all is happily working for you, you can turn off that setting and delete the logs that are created ...

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!

22 Oct 2013, 4:29 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

These settings are a bad idea:

Maximum: 30000 Tare Rates: Small/Medium: 10:500 Large: 10:0

USPS Maximum is: 70 Tare Rates you do not want to add 10% plus 500lbs per order ... again USPS Maximums are 70 ...

As you have selected CUSTOM on your Days ... did you Customize the code in any way for the Days? If you are not sure what to do, change this setting to NEW and try another quote for this, after you fix your Maximum Weight and Tare Rate ... you will note in your log file that the the weight of this 1lb 7oz order was 135lbs ... kind of a lot of packaging on that ... :lookaroun

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!

22 Oct 2013, 4:49 AM
#8
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Ajeh, I use grams as the weight unit for my ZC, and that is why those numbers are so large. Then translate the weight into lbs in shipping.php before it is processed by your usps module. But the trans. time wasn't showing even before I changed the unit to gram.

22 Oct 2013, 4:51 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

You may be using grams but USPS knows nothing about them and there is not conversion for this so USPS is using weight ...

I am not sure how you are doing this conversion so that USPS gets the right weight and how your use of grams might affect things ...

Other than changing the text from lbs to grams ... what have you do to manage the weight conversion?

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!

22 Oct 2013, 2:03 PM
#10
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Ajeh,

The only file that I have modified other than changing the text lbs to gram is /includes/classes/shipping.php. I added a conversion fourmula (*0.0022) onto the quote function for the shipping box weight (Tare Rates: Small/Medium: 10:500 Large: 10:0). BTW, I changed the transit time setting to NEW but had no luck.

As I stated, I made the unit change recently, and the trans. time had not been showing with lbs either.

Regards,

22 Oct 2013, 2:16 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Could you Zip your file for:
/includes/classes/shipping.php

maybe I can see something quirky happening when I try to use that while testing this, as I am getting the days to show but perhaps something is causing this issue related to the changes for the conversion ...

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!

22 Oct 2013, 2:18 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Could you Zip your file for:
/includes/classes/shipping.php

maybe I can see something quirky happening when I try to use that while testing this, as I am getting the days to show but perhaps something is causing this issue related to the changes for the conversion ...

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!

23 Oct 2013, 1:05 AM
#13
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Ajeh,

Sorry for the delayed response. I was on the road all day and did not have access to the file.

shipping.php.zip

Thank you again for your time and assistance...

23 Oct 2013, 3:19 AM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Could you also Zip your file for:
/includes/modules/shipping/usps.php

and add it as an attachment to your next post ...

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!

23 Oct 2013, 3:41 AM
#15
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Ajeh,

Please find the attached file, usps.php.

Thank you,

23 Oct 2013, 3:51 AM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

As a test ... can you change the Maximum Weight to 50 and the Tare Rates to 0:0 ...

Then test your order ... does this alter the results in any way?

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!

23 Oct 2013, 3:57 AM
#17
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

No, I get the same result:

United States Postal Service (1 個口) (0 lbs, 5 oz) (Priority Mail International®) $41
United States Postal Service (1 個口) (0 lbs, 5 oz) (Priority Mail Express International™) $48

Regards,

23 Oct 2013, 4:00 AM
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Have you an URL to your site and the Products that are in the Order so that I can test some things on your site?

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!

20 Nov 2013, 2:55 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS Shipping Module - No estimated transit time for International shipments

Can you try starting with this USPS shipping module, customized for you, and see if the Custom Days work better for you?

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!

21 Nov 2013, 4:34 AM
#20
zaaep005 avatar

zaaep005

New Zenner

Join Date:
Mar 2011
Posts:
33
Plugin Contributions:
0

Re: USPS Shipping Module - No estimated transit time for International shipments

Ajeh:

Can you try starting with this USPS shipping module, customized for you, and see if the Custom Days work better for you?

Ajeh,

This works, but the only thing is that after adding the modification below, the First-Class only shows "Varies by destinations." I also would like to see the days "7-12 days" as you customized. I'm sure that you have a solution to this...

Ajeh:

Edit the file:
/includes/modules/shipping/usps.php

and add the code in RED:

[B]// bof: check Product Qty in categories_id 25
$chk_cat = 0;
$chk_cats = $_SESSION['cart']->in_cart_check('master_categories_id','25');
// eof: check Product Qty in categories_id 25
[/B]
for ($i=0; $i<$PackageSize; $i++) {

> 
> ```
          if ($this->usps_countries == 'US' && MODULE_SHIPPING_USPS_FIRST_CLASS_FILTER_US == 'True' && preg_match('#First\-Class#i', $type) && $cnt_first > 1) continue;

[B]// bof: only show First Class/First-Class when entire cart is categories_id 25
if ($chk_cats != $_SESSION['cart']->count_contents() && preg_match('#First\-Class#i', $type)) {
//  echo 'USPS skip $type: ' . $type . '<br>';
  // skip First Class
} else {
//  echo 'USPS DO NOT skip $type: ' . $type . '<br>';
[/B]          $methods[] = array('id' => $type_rebuilt,
                             'title' => $title,
                             'cost' => $cost,
                            );
[B]}
// eof: only show First Class/First-Class when entire cart is categories_id 25
[/B]