Jump to content

Issue with USPS Module not working


RobertBrus

Recommended Posts

I have registered an account with USPS and had them set it up on the production server:

Dear Robert,

Thank you for contacting the USPS Internet Customer Care Center in regards to having your Web Tools account moved to the Production server. I am happy to assist you today.

Your profile has been updated to allow you access to the Production Server with access to Price Calculator, Package Tracking and Service Standard APIs. The production server URL is: http://production.shippingapis.com and the secure server URL is https://secure.shippingapis.com.

 

...

 

 

I enabled the plugin through the plugin Manager and made sure that the country is set to match the store "United States" I also have confirmed the username for my USPS account is correct.

 

I get the following Error upon Checkout when viewing my shopping basket:

The following errors were detected:

  • Unfortunately there are no suitable shipping methods available for your order. This may be because the total weight of your order is too high or we cannot ship to your country. Please contact a member of our staff for any further inquiries.

 

 

 

I was looking through the forums and saw some steps in this >forum.  I entered the code from post #7 in the modulesshippingUSPSshipping.class.php file.

 

Here are the results showing up in trace_log.txt

 

150319 23:10:11 The country_d is: United States and the store_country is: 840

So the shipping api is: 
150319 23:11:32 The country_d is: United States and the store_country is: 840
So the shipping api is: 
150319 23:11:46 The country_d is: United States and the store_country is: 840
So the shipping api is: 
150319 23:11:54 The country_d is: United States and the store_country is: 840
So the shipping api is: 
150319 23:12:17 The country_d is: United States and the store_country is: 840
So the shipping api is: 

 

 

 

Is there a suggestion for any other code I can enter to help troubleshoot this further (I notice in the log above that it shows "shipping api is:" blank

 

We are running version 6.0.1 which I upgraded last weekend before attempting to switch over the shipping to use the USPS module.

 

Thanks

Link to comment
Share on other sites

That tracer advice is a bit old -- things have changed just a bit since.

 

The line that would work with the latest USPS module would be:

Was:
fwrite($fp, date("ymd H:i:s")." The country_d is: ".$delivery['country']." and the store_country is: ".$GLOBALS['config']->get('config','store_country')."rn");
 
Now:
fwrite($fp, date("ymd H:i:s")." The country_id is: ".$delivery['country_id']." and the store_country is: ".$GLOBALS['config']->get('config','store_country')."rn");

The results should be matching numbers.

 

You said, "made sure that the country is set to match the store "United States." Are you referring to the Allowed Zones tab? For now, keep the Allowed Zones and Disabled Zones blank.

 

You were also told, "access to the Production Server with access to Price Calculator, Package Tracking and Service Standard APIs." You may want to verify with USPS that you want access to the "Rates Calculator," otherwise known as the "Shipping API DLL."

 

Also, you might find a better error logging in the admin, Request Log and/or Error Log.

Link to comment
Share on other sites

Thanks bsmither, things are working now - mistake was on my end but solved with your advice.

 

I updated that line of code and removed all allowed zones and disallowed zones blank (I am presuming this means that all zones should be allowed), this is what returns now:

150320 19:00:46 The country_id is: 840 and the store_country is: 840
So the shipping api is: 

I called USPS after they had not responded to my email (it was less than 24 hours but wanted to resolve this before the weekend), they confirmed that "ShippingAPI.dll" is on that production server and available.

 

But the biggest help was to look elsewhere 

 

Also, you might find a better error logging in the admin, Request Log and/or Error Log.

 

There were no errors but the request log showed me everything I needed to know.  I made some adjustments with a few products (I saw the wights in the request xml were listed as 0) and after that I saw responses coming back from USPS.  The responses previous to that were errors due to the 0 weight.  From there I adjusted the types of shipping we would allow since the response brings back all available options and now those types of shipping are displaying and updating in the baskets correctly upon checkout.

 

Thanks for you quick response and advice.

Link to comment
Share on other sites

I would be more than happy help troubleshoot and research that - not sure it is causing a problem on the sight but possibly something we aren't using yet.  Any suggestions on what you would like me to look for or any other logging you can think of let me know and we can see what we can find.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...