Jump to content

How to get a test for the USPS shipping


Guest anakin827

Recommended Posts

i wrote to cust service and said:

"Im using a ecommerce software that has a USPS software, it would be out of the way for me to use the test server so can you please add me to the production server

Thanks,

Mitch"

they did as i asked within 24 hours.

Link to comment
Share on other sites

Guest keiichi000

Good to hear, are you having any other issues with it.. cause once I got that working, I ran into all SORTS of wierd issues with the USPS stuff that I will drop here for documentation sake and hopefully help any other people if they get the issues.

I have found a couple of errors that I have submitted using the bug tracker. There looks to be an error in the way CubeCart is sending the XML sheet to USPS when you have more then one USPS shipping type available. [From what I see, it looks like the XML datasheet is closing itself out too quickly.]

Anyways, here is what I found

Request XML:

--------------------------------------------------------------------------------

<RateV2Request USERID="XXXXXXX" PASSWORD="XXXXXXX"><Package ID="0"><Service>EXPRESS</Service><ZipOrigination>76201</ZipOrigination>

<ZipDestination>76201</ZipDestination><Pounds>2</Pounds>

<Ounces>0</Ounces><Container>Flat Rate Envelope</Container>

<Size>Regular</Size></Package></RateV2Request>

<Package ID="1"><Service>PRIORITY</Service>

<ZipOrigination>76201</ZipOrigination><ZipDestination>76201</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces>

<Container>Flat Rate Box</Container><Size>Regular</Size></Package>

</RateV2Request>

--------------------------------------------------------------------------------

Return XML:

--------------------------------------------------------------------------------

<?xml version="1.0"?>

<Error><Number>-2147219093</Number><Source>GetXML;SolServerRates.RateV2Respond</Source><Description>-2147219093Only one top level element is allowed in an XML document.

</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

This happens if you are offering more then one shipping level on USPS. If you look at the XML send, you can see that </RateV2Request> is being sent twice without reopening it. Thus the XML data sheet errors out on the USPS side.

You may also get this error when trying to use Parcel Post in the USPS Module.

One of the following variables was empty. service = 'PARCEL', ziporigin = '76201', zipdest = '', pounds = '2', size = 'REGULAR'

On line 130 there is this entry in calc.php in the USPS Package

'zipdest' => $$zipdest,

By changing it to this fixes the problem

'zipdest' => $zip_dest,

PS - As a side note, due to the amount of time the USPS Module takes to actually fetch it's rates [i assume this is a USPS issue], is it possible that cube cart could display a screen that simply says "Please wait while we calculate the shipping options available for your order"?

~k1

Link to comment
Share on other sites

actually; yeah I am having a issue with it...when I try to checkout it gives me "USPS::submit_request: domxml_open_mem is uncallable"...Haven't played with it too much yet but i heard somewhere that webhost has to do something.

Link to comment
Share on other sites

Good to hear, are you having any other issues with it.. cause once I got that working, I ran into all SORTS of wierd issues with the USPS stuff that I will drop here for documentation sake and hopefully help any other people if they get the issues.

I have found a couple of errors that I have submitted using the bug tracker. There looks to be an error in the way CubeCart is sending the XML sheet to USPS when you have more then one USPS shipping type available. [From what I see, it looks like the XML datasheet is closing itself out too quickly.]

Anyways, here is what I found

Request XML:

--------------------------------------------------------------------------------

<RateV2Request USERID="XXXXXXX" PASSWORD="XXXXXXX"><Package ID="0"><Service>EXPRESS</Service><ZipOrigination>76201</ZipOrigination>

<ZipDestination>76201</ZipDestination><Pounds>2</Pounds>

<Ounces>0</Ounces><Container>Flat Rate Envelope</Container>

<Size>Regular</Size></Package></RateV2Request>

<Package ID="1"><Service>PRIORITY</Service>

<ZipOrigination>76201</ZipOrigination><ZipDestination>76201</ZipDestination><Pounds>2</Pounds><Ounces>0</Ounces>

<Container>Flat Rate Box</Container><Size>Regular</Size></Package>

</RateV2Request>

--------------------------------------------------------------------------------

Return XML:

--------------------------------------------------------------------------------

<?xml version="1.0"?>

<Error><Number>-2147219093</Number><Source>GetXML;SolServerRates.RateV2Respond</Source><Description>-2147219093Only one top level element is allowed in an XML document.

</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

This happens if you are offering more then one shipping level on USPS. If you look at the XML send, you can see that </RateV2Request> is being sent twice without reopening it. Thus the XML data sheet errors out on the USPS side.

You may also get this error when trying to use Parcel Post in the USPS Module.

One of the following variables was empty. service = 'PARCEL', ziporigin = '76201', zipdest = '', pounds = '2', size = 'REGULAR'

On line 130 there is this entry in calc.php in the USPS Package

'zipdest' => $$zipdest,

By changing it to this fixes the problem

'zipdest' => $zip_dest,

PS - As a side note, due to the amount of time the USPS Module takes to actually fetch it's rates [i assume this is a USPS issue], is it possible that cube cart could display a screen that simply says "Please wait while we calculate the shipping options available for your order"?

~k1

Cal.php reads as follows

'zip_dest' => $zip_dest,

Should it be

'zipdest' => $zip_dest,

Man HELP?

I keep getting same errors as others have had.

Link to comment
Share on other sites

Guest keiichi000

USPS::submit_request: domxml_open_mem

This is not something cubecart can fix, since this is actually an error in your PHP install. Make sure you have the PHP domxml plugin installed. This is something you will need to check with your server host.

~k1

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...