Post by JeffroDH » Wed Nov 18, 2015 8:19 pm

This is the official support thread for the 2.x branch of the extension USPS API Update (Latest API Update). This VQMod simply addresses the changes for the latest API update. For OpenCart versions 1.4.x, the RateV4 API replaces the RateV3 API.

An older thread for the 1.4.x and 1.5.x branches of this extension is available HERE.

This extension is compatible with the latest version of the USPS APIs, which currently includes the April 2016 update.

Things to include for a rapid resolution of your issue:
  • 1. A detailed description of the problem
    2. Your OpenCart error log
    3. Your VQMod error log
    4. OpenCart Version
Leaving out any one of these makes it very difficult to provide support and will result in my asking for the omitted data. Help me to help you.

For the fastest support, you can send me a PM with FTP and admin credentials. This option isn't for everyone. Make sure you understand exactly what you're doing.

Common Problems:
  • 1. Please make sure that your weight classes are set up appropriately! If the package weight is not accurate, you won't see the correct shipping methods. This issue most often affects First-Class Mail Parcel service and First-Class International Parcel Service.

    2. Read the USPS documentation to ensure you have the proper package type selected for your desired shipping options. Code is in place to help you when you have the wrong options selected, but it may not be foolproof.

    3. Check for other VQMods that write to the same files as this mod.
    • a. If the most expensive shipping option is listed first after this mod is installed, it's very likely that you have a custom template or theme that changes the code on the customer side. If you don't include your VQMod and system error logs in the post, there is no chance that I can help you.
    4. Check for extra whitespace in your file. This is particularly common with 1.4.x installs.

    5. It's likely that your usps.php file has been modified. Restore the stock file, or disable other VQMods that write to the file. If there is a conflict, let me know and I'll do my best to account for it in the next version. I'm here to support this extension for free. If you need something customized to fit a heavily modified cart, my fees for work involving shipping APIs are $25/hr. with a one hour minimum, billable every half hour after.

    6. If you're having problems with small flat-rate pricing, the maximum dimensions for that method are:
    From the USPS documentation:

    For example, Small Flat Rate Box will not be returned when <Size>=”REGULAR” and dimensions provided exceed those of the Small Flat Rate Box (8-5/8” x 5-3/8” x 1-5/8”).
    7. If quotes are not showing up in the cart, but display correctly during checkout and you're running 2.x: Your .../template/checkout/shipping.tpl file may have been modified by a custom theme. If it has, you'll need to have the extension modified to accommodate your theme.

    I am happy to do this for you for a small fee, or you can do it yourself. My fee for this modification is $25. Contact me via PM.

    8. Parcel Select Ground: After some conversations with USPS support, I have been informed that Parcel Select Ground is a method intended for large volume shippers like Amazon, Fedex, and UPS. It is cheaper because the packages are delivered directly to the destination post office, and USPS simply makes the home delivery rather than transporting the package across the state/country. You likely do not qualify for the Parcel Select Ground service, which is why it isn't showing up.
The retirement of the RateV3 API does not affect this mod, as it is based on the newer RateV4 API.

12/2/2017
Updates have been coming less frequently. All versions have been updated to support the latest API Updates that broke First-Class shipping. If there are any more issues, please post here on this thread so that I can get a fix out. Thank you.

4/10/2016
This mod is not affected by the April 2016 USPS Web Tools Update.

2/29/2016
This mod is not affected by the February 2016 USPS Web Tools Update.

10/24/2015
This modification is not affected by the September USPS Web Tools Update. Business continues as normal.

8/7/2015
As of July 25th, 2015, USPS is no longer ignoring package sizes when package type is REGULAR. Package sizes are still optional in this case, but if a size is provided, it will be used to limit the shipping options returned from USPS.

6/8/2015
Missed some things regarding the International Rate API and shipping to Canada. Thank you to the users for quick feedback and attempting to support the issue. A new version has been released that should take care of the problem.

5/31/2015
There are some changes being pushed to the USPS API today. This extension should work flawlessly through the transition.(Read: there were no changes that affected the basic price quote function)

10/17/2014
Versions of this mod for OpenCart 1.4.x have been updated.

10/7/2014
version 1.4.1b addresses a bug that was introduced with the September 2014 update. As far as I can tell right now, the bug only affected users with OpenCart versions greater than or equal to 1.5.2

9/22/2014
Updated all versions to include September 2014 maintenance update.
Fixed bug that occurred in Mountain and Pacific Time zones between 10 and midnight if USPS routed the request to the Chicago server.

1/14/2014
Updated the code for compatibility with the January USPS API update. A delay in upgrading shouldn't break your USPS, the January update is pretty minor. More editions for earlier versions of OC will be forthcoming shortly.

Bug fixes, support, and minor API updates (as they come) will continue for this VQMod.

8/28/2013:
Updated the code with a modification that sorts all of the shipping methods by price in the shopping cart popup. Version 1.3.3 is live and happening!

8/14/2013:
Wrote a version for 1.4.7 that updates the same information. 1.4.7 version does not update the stock USPS module to Rate Request v4 or International Rate Request v2. Anticipate a release for OC 1.4.x with the updated rate requests.

8/3/2013:
Confirmed compatibility with 1.5.6.
Updated domestic shipping options to reflect all methods being returned by the API.

8/2/2013:
Fixed a bug in 1.1 that broke the mod. 1.2 is live and happy!
Last edited by JeffroDH on Sun Dec 03, 2017 1:56 pm, edited 3 times in total.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Sat Dec 05, 2015 2:58 am

There is an upcoming update that will affect USPS users on January 17th, 2016. More detailed information can be found in the original post in this thread.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by raybark » Tue Apr 05, 2016 3:26 am

I have recently begun getting the following whenever someone chooses to use USPS in my Opencart 2.0.3.1 installation.

OC error log:

Code: Select all

2016-04-04 11:33:34 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID="...........">	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination>20744</ZipDestination>		<Pounds>3</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:33:34 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="1"><ZipOrigination>18902</ZipOrigination><ZipDestination>20744</ZipDestination><Pounds>3</Pounds><Ounces>0</Ounces><Size>LARGE</Size><Machinable>FALSE</Machinable><Zone>2</Zone><Postage CLASSID="3"><MailService>Priority Mail Express&#8482;</MailService><Rate>22.95</Rate><CommercialRate>20.66</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="2"><MailService>Priority Mail Express&#8482; HoldmercialRate>6.09</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="33"><MailService>Priority Mail&#8482; Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>6.09</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>3.72</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>3.55</Rate></Postage></Package></RateV4Response>
2016-04-04 11:35:22 - USPS DATA </ZipDestination>		<Pounds>3</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:35:22 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147219099</Number><Source>clsRateV4:UnpackRateNode</Source><Description>Missing value for ZipDestination.</Description><HelpFile/><HelpContext/></Error>
2016-04-04 11:38:12 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID=	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination></ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:38:13 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147219099</Number><Source>clsRateV4:UnpackRateNode</Source><Description>Missing value for ZipDestination.</Description><HelpFile/><HelpContext/></Error>
2016-04-04 11:38:21 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USER	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination></ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:38:21 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147219099</Number><Source>clsRateV4:UnpackRateNode</Source><Description>Missing value for ZipDestination.</Description><HelpFile/><HelpContext/></Error>
2016-04-04 11:39:21 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID=>	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination></ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:39:21 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147219099</Number><Source>clsRateV4:UnpackRateNode</Source><Description>Missing value for ZipDestination.</Description><HelpFile/><HelpContext/></Error>
2016-04-04 11:39:26 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID=">	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination></ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:39:26 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147219099</Number><Source>clsRateV4:UnpackRateNode</Source><Description>Missing value for ZipDestination.</Description><HelpFile/><HelpContext/></Error>
2016-04-04 11:39:35 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID="	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination></ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:39:35 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147219099</Number><Source>clsRateV4:UnpackRateNode</Source><Description>Missing value for ZipDestination.</Description><HelpFile/><HelpContext/></Error>
2016-04-04 11:39:42 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID=>	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination>20744</ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:39:42 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="1"><ZipOrigination>18902</ZipOrigination><ZipDestination>20744</ZipDestination><Pounds>7</Pounds><Ounces>0</Ounces><Size>LARGE</Size><Machinable>FALSE</Machinable><Zone>2</Zone><Postage CLASSID="3"><MailService>Priority Mail Express&#8482;</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="2"><MailService>Priority Mail Express&#8482; Hold For Pickup</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="1"><MailService>Priority Mail&#8482;</MailService><Rate>10.60</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="33"><MailService>Priority Mail&#8482; Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>5.72</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>5.47</Rate></Postage></Package></RateV4Response>
2016-04-04 11:39:49 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USER>	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination>20744</ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:39:50 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="1"><ZipOrigination>18902</ZipOrigination><ZipDestination>20744</ZipDestination><Pounds>7</Pounds><Ounces>0</Ounces><Size>LARGE</Size><Machinable>FALSE</Machinable><Zone>2</Zone><Postage CLASSID="3"><MailService>Priority Mail Express&#8482;</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="2"><MailService>Priority Mail Express&#8482; Hold For Pickup</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="1"><MailService>Priority Mail&#8482;</MailService><Rate>10.60</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="33"><MailService>Priority Mail&#8482; Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>5.72</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>5.47</Rate></Postage></Package></RateV4Response>
2016-04-04 11:40:12 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID=">	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination>20744</ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:40:12 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="1"><ZipOrigination>18902</ZipOrigination><ZipDestination>20744</ZipDestination><Pounds>7</Pounds><Ounces>0</Ounces><Size>LARGE</Size><Machinable>FALSE</Machinable><Zone>2</Zone><Postage CLASSID="3"><MailService>Priority Mail Express&#8482;</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="2"><MailService>Priority Mail Express&#8482; Hold For Pickup</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="1"><MailService>Priority Mail&#8482;</MailService><Rate>10.60</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="33"><MailService>Priority Mail&#8482; Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>5.72</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>5.47</Rate></Postage></Package></RateV4Response>
2016-04-04 11:40:24 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID=>	<Package ID="1">		<Service>ONLINE</Service>		<ZipOrigination>18902</ZipOrigination>		<ZipDestination>20744</ZipDestination>		<Pounds>7</Pounds>		<Ounces>0</Ounces>		<Container>RECTANGULAR</Container>		<Size>LARGE</Size>		<Width>12</Width>		<Length>12</Length>		<Height>12</Height>		<Girth>60</Girth>		<Machinable>false</Machinable>		<ShipDate>04-Apr-2016</ShipDate>	</Package></RateV4Request>
2016-04-04 11:40:24 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<RateV4Response><Package ID="1"><ZipOrigination>18902</ZipOrigination><ZipDestination>20744</ZipDestination><Pounds>7</Pounds><Ounces>0</Ounces><Size>LARGE</Size><Machinable>FALSE</Machinable><Zone>2</Zone><Postage CLASSID="3"><MailService>Priority Mail Express&#8482;</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="2"><MailService>Priority Mail Express&#8482; Hold For Pickup</MailService><Rate>30.10</Rate><CommercialRate>27.09</CommercialRate><CommitmentDate>2016-04-05</CommitmentDate><CommitmentName>1-Day</CommitmentName></Postage><Postage CLASSID="1"><MailService>Priority Mail&#8482;</MailService><Rate>10.60</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="33"><MailService>Priority Mail&#8482; Hold For Pickup</MailService><Rate>0.00</Rate><CommercialRate>7.63</CommercialRate><CommitmentDate>2016-04-06</CommitmentDate><CommitmentName>2-Day</CommitmentName></Postage><Postage CLASSID="6"><MailService>Media Mail Parcel</MailService><Rate>5.72</Rate></Postage><Postage CLASSID="7"><MailService>Library Mail Parcel</MailService><Rate>5.47</Rate></Postage></Package></RateV4Response>
There is nothing in the vqmod logs referencing USPS at all.
Last edited by raybark on Sat Apr 23, 2016 10:36 pm, edited 3 times in total.

New member

Posts

Joined
Tue Sep 03, 2013 9:23 pm

Post by JeffroDH » Thu Apr 21, 2016 2:06 am

raybark wrote:I have recently begun getting the following whenever someone chooses to use USPS in my Opencart 2.0.3.1 installation.

OC error log:

2016-04-04 11:33:34 - USPS DATA SENT: API=RateV4&XML=<RateV4Request USERID="XXXXXXXX"> <Package ID="1"> <Service>ONLINE</Service> <ZipOrigination>18902</ZipOrigination> <ZipDestination>20744</ZipDestination> <Pounds>3</Pounds> <Ounces>0</Ounces> <Container>RECTANGULAR</Container> <Size>LARGE</Size> <Width>12</Width> <Length>12</Length> <Height>12</Height> <Girth>60</Girth> <Machinable>false</Machinable> <ShipDate>04-Apr-2016</ShipDate> </Package></RateV4Request>
2016-04-04 11:33:34 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
...
There is nothing in the vqmod logs referencing USPS at all.
You should turn Debug Mode off in the USPS settings. Also, please edit this post to shorten it and remove your USPS User ID from the XML request.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by tdaubs » Fri Jul 01, 2016 2:24 am

Using Opencart version 2.1.0.2 along with Journal theme. We are also using the most recent version of USPS API Update.

Getting this error when using a Canada address.

The element 'IntlRateV2Request' has invalid child element 'Revision'. List of possible elements expected: 'RateClientType, Package'.
No errors in vqmod logs related to this extension.

No errors in Opencart logs related to this extension.

Any ideas?

Image
Opencart Support . Opencart Galaxy . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by JeffroDH » Fri Jul 01, 2016 6:58 am

tdaubs wrote:Using Opencart version 2.1.0.2 along with Journal theme. We are also using the most recent version of USPS API Update.

Getting this error when using a Canada address.

The element 'IntlRateV2Request' has invalid child element 'Revision'. List of possible elements expected: 'RateClientType, Package'.
No errors in vqmod logs related to this extension.

No errors in Opencart logs related to this extension.

Any ideas?
Are you using the vqmod or the ocmod? If you're using the OCmod, I'd suggest trying the VQMod version.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by tdaubs » Fri Jul 01, 2016 7:02 am

Yes, we are using the vQmod version.

Any ideas what might be the issue?

I might add... I also tested a UK address and got the same error.

Image
Opencart Support . Opencart Galaxy . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by JeffroDH » Fri Jul 01, 2016 7:05 am

Not at my desk so I can't find the exact line number for you, but if you'll look in the XML file in the section dealing with the usps.php file, you should see the <Revision> tag. You can comment that line out and see if that solves your issue. I'll check usps to be sure that they haven't updated the API recently without notifying developers.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Fri Jul 01, 2016 7:13 am

Looking at the tech documents (which were updated in April), <Revision> is a valid tag for the International Rate V2 API. Turn on debug mode, attempt to get an international quote, and then post the XML request and response from USPS. This may be a problem on their end.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by tdaubs » Fri Jul 01, 2016 7:27 am

See below.

Code: Select all

2016-06-30 18:25:01 - USPS DATA SENT: API=IntlRateV2&XML=<IntlRateV2Request USERID="12345"><Revision>2</Revision>	<Revision>2</Revision>	<Package ID="1">		<Pounds>8</Pounds>		<Ounces>0</Ounces>		<MailType>All</MailType>		<GXG>		  <POBoxFlag>N</POBoxFlag>		  <GiftFlag>N</GiftFlag>		</GXG>		<ValueOfContents>49.99</ValueOfContents>		<Country>Canada</Country>		<Container>RECTANGULAR</Container>		<Size>REGULAR</Size>		<Width>12</Width>		<Length>12</Length>		<Height>4</Height>		<Girth></Girth>		<OriginZip>65785</OriginZip>		<OriginZip>65785</OriginZip>		<CommercialFlag>Y</CommercialFlag>      <AcceptanceDateTime>2016-06-30T18:25:01-05:00</AcceptanceDateTime>		<DestinationPostalCode>K1A0G9</DestinationPostalCode>	</Package></IntlRateV2Request>
2016-06-30 18:25:01 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147221202</Number><Source>Common:XmlParse</Source><Description>The element 'IntlRateV2Request' has invalid child element 'Revision'. List of possible elements expected: 'RateClientType, Package'.</Description><HelpFile/><HelpContext/></Error>

Image
Opencart Support . Opencart Galaxy . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by tdaubs » Mon Jul 04, 2016 6:44 am

Any ideas? Thanks in advance!

Image
Opencart Support . Opencart Galaxy . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by tdaubs » Wed Jul 06, 2016 4:34 am

I had to disable this modification as it was breaking our international shipping using OC 2.1.0.2.

Normally I have good success with this mod but for some reason it didn't like our version of OC.

Image
Opencart Support . Opencart Galaxy . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by JeffroDH » Wed Jul 06, 2016 8:11 am

tdaubs wrote:I had to disable this modification as it was breaking our international shipping using OC 2.1.0.2.

Normally I have good success with this mod but for some reason it didn't like our version of OC.
In the XML request, I'm seeing the "Revision" tag twice. That's where the error is coming from. I'll need to update the mod for the newer versions of OC, which have apparently fixed this in the core code.

To fix your issue, simply comment out the lines in the VQMod that add the <Revision> tag.

If you'll PM your VQmod file, I'll edit it for you and send it back.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Sat Jul 09, 2016 2:41 pm

tdaubs wrote:I had to disable this modification as it was breaking our international shipping using OC 2.1.0.2.

Normally I have good success with this mod but for some reason it didn't like our version of OC.
I have a solution for you, and I'm PMing you a new version of the VQMod and OCMod files to test.

OC updated their USPS implementation, and this mod was causing duplicate tags in some versions of OC.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by websiteworld » Tue Jan 03, 2017 1:47 am

We are using the Opencart 2.3.0.2 Journal the 2 theme and we have both UPS and USPS on checkout, we are mainly looking for something that will sort the shipping and select the cheapest USPS rate first, for some reason customers are accidently choosing overnight shipping. Will this work?

Also, some of the products are required to be sent USPS Ground and if they are in a zone far away USPS the USPS retail ground rate shows up because it's a penny cheaper than Priority, but if they our close to our zip code, the USPS retail ground rate is not shown at all which is a problem for us. I assume this is not something that can be fixed because the API is not returning the rate because they ASSUME people will choose priority mail because it's cheaper and quicker than ground.

Attachments

usps-opencart2.jpg

Sort - usps-opencart2.jpg (23.15 KiB) Viewed 5743 times


User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am


Post by JeffroDH » Fri Jan 06, 2017 10:47 pm

websiteworld wrote:We are using the Opencart 2.3.0.2 Journal the 2 theme and we have both UPS and USPS on checkout, we are mainly looking for something that will sort the shipping and select the cheapest USPS rate first, for some reason customers are accidently choosing overnight shipping. Will this work?

Also, some of the products are required to be sent USPS Ground and if they are in a zone far away USPS the USPS retail ground rate shows up because it's a penny cheaper than Priority, but if they our close to our zip code, the USPS retail ground rate is not shown at all which is a problem for us. I assume this is not something that can be fixed because the API is not returning the rate because they ASSUME people will choose priority mail because it's cheaper and quicker than ground.
Working on your site now, per our emails. The Ground rates for USPS are based on ZONE, and if the zip code is in Zone 1 for your location, certain rate classes are simply not available. You can work around this by selecting other low-cost shipping methods, but you are correct that it is simply a "feature" of the USPS API.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by websiteworld » Fri Jan 27, 2017 8:36 am

Thanks for all your help @JeffroDH! I just wrote a blog about your extension and the importance of sorting shipping. Don't forget to rebrand your extension to target this audience, because I think there is probably an untapped market for this. It's a huge oversight to have the most expensive shipping method selected by default. http://websiteworld.com/opencart-2-3-1- ... xtensions/

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am


Post by tzantello » Wed Feb 15, 2017 1:48 am

When will this be compatible with 2.3.0.2? Thanks.

Newbie

Posts

Joined
Fri Jan 27, 2017 2:03 am

Post by websiteworld » Wed Feb 15, 2017 2:45 am

tzantello wrote:
Wed Feb 15, 2017 1:48 am
When will this be compatible with 2.3.0.2? Thanks.
I'm using it with Journal 2 and Opencart Version 2.3.0.2

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am


Post by becauseinterwebs » Tue Apr 18, 2017 12:33 am

I just uploaded the mod via the Extensions Installer (OC 2.3.0.2), cleared the cache and am not seeing any changes. Should there be an interface change in the admin? I'm still only getting one option when I go to checkout. I have selected multiple options in the USPS configuration for both domestic (US) and international, but it only ever comes back with one option. Thank you!


Posts

Joined
Mon Apr 17, 2017 11:40 pm
Who is online

Users browsing this forum: No registered users and 1 guest