Jump to content
Sign in to follow this  
mattwho

usps methods

Recommended Posts

I installed the USPS Methods contribution. I set it to send me an email of the response from USPS

This is what I get

<?xml version="1.0"?>

<RateResponse><Package ID="0"><Service>Express</Service><ZipOrigination>93933</ZipOrigination><ZipDestination>93933</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces><Container>NONE</Container><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage>17.85</Postage></Package><Package ID="1"><Error><Number>-2147219434</Number><Source>DomesticRates:clsRateEngine.CalcDomesticRate;SolServer.CallRateDll</Source><Description>First Class mail must weigh 13 ounces or less.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package><Package ID="2"><Service>Priority</Service><ZipOrigination>93933</ZipOrigination><ZipDestination>93933</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces><Container>NONE</Container><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage>3.95</Postage></Package><Package ID="3"><Service>Parcel</Service><ZipOrigination>93933</ZipOrigination><ZipDestination>93933</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces><Container>NONE</Container><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage>4.48</Postage></Package></RateResponse>

 

However on my site it just shows

United States Postal Service 

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner. 

Share this post


Link to post
Share on other sites

I get rates as shown in the xml response but the module just isn't showing them. In the install directions it states

To research persistent errors or to satisfy raw curiosity, you can enable

  an embedded hook in the catalog/includes/modules/shipping/usps.php script that

  sends an email containing the rate quote response from USPS.  The email text

  will be in XML format, but careful examination will reveal useful details.

  Find the commented statement at line 273, insert your correct email address

  in place of "you@yourdomain.com" in both places it occurs, and remove

  the leading "//" characters that make the line a comment.  Restore the comment

  characters after you have tested using this hook.  If you don't receive any

  email after testing with this hook, that may indicate a failure in http socket

  handling on your server.

 

i did this and I recieve an email with this

<?xml version="1.0"?>

<RateResponse><Package ID="0"><Service>Express</Service><ZipOrigination>93933</ZipOrigination><ZipDestination>93933</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces><Container>NONE</Container><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage>17.85</Postage></Package><Package ID="1"><Error><Number>-2147219434</Number><Source>DomesticRates:clsRateEngine.CalcDomesticRate;SolServer.CallRateDll</Source><Description>First Class mail must weigh 13 ounces or less.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package><Package ID="2"><Service>Priority</Service><ZipOrigination>93933</ZipOrigination><ZipDestination>93933</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces><Container>NONE</Container><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage>3.95</Postage></Package><Package ID="3"><Service>Parcel</Service><ZipOrigination>93933</ZipOrigination><ZipDestination>93933</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces><Container>NONE</Container><Size>REGULAR</Size><Machinable>FALSE</Machinable><Zone>1</Zone><Postage>4.48</Postage></Package></RateResponse>

 

but site still says

United States Postal Service 

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner. 

 

UPS and FEDEX work fine

Share this post


Link to post
Share on other sites
Who wrote usps methods?

I am one of the co-authors, and posted the last revision v2.7.

 

It is working fine for two of my sites and lots of others', so I suspect other mods made to your site may be interfering. Have you got any other shipping module to work? For instance, how about the standard USPS module?

 

I always recommend getting a store working with standard payment and shipping modules before switching to contributed ones. Otherwise it is harder to troubleshoot.

Share this post


Link to post
Share on other sites

The original USPS module would not work either. UPS and FEDEX work perfectly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×