Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

usps methods


mattwho

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. 

Link to comment
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 "[email protected]" 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

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...