Post by JeffroDH » Sat Aug 03, 2013 5:37 am

This is the official support thread for 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.

A newer thread for the 2.x branch of this extension is located 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.

7/10/2016
The mod has been updated to fix a few bugs that were affecting 2.1+ shops. The OCMod version should be working now, and the problems some users were having with International shipping quotes should be fixed. Let me know how it goes.

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 2015 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:52 pm, edited 38 times in total.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by ase618 » Sat Aug 03, 2013 6:02 am

Unless I'm missing it a link to the extension would be handy ;-)

artisantool.co
Don't forget to add [SOLVED] to your Thread Title (first post), if your issue is solved.


Active Member

Posts

Joined
Sun Jul 29, 2012 9:59 pm

Post by JeffroDH » Sun Aug 04, 2013 1:10 pm

ase618 wrote:Unless I'm missing it a link to the extension would be handy ;-)
Ha. Post updated, thanks for looking out.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by ase618 » Sun Aug 04, 2013 9:38 pm

Anything I can do to help out:-)

artisantool.co
Don't forget to add [SOLVED] to your Thread Title (first post), if your issue is solved.


Active Member

Posts

Joined
Sun Jul 29, 2012 9:59 pm

Post by whaus777 » Fri Aug 16, 2013 2:28 am

Thanks for the extensions. Just one problem. The extension fixed my issue I had with <sup> tags but now it's displaying the wrong shipping times still.

Priority Mail 1-Day™ - $5.80
Priority Mail Express 2-Day™ - $18.10

should be the opposite.. example

Priority Mail 2-3 Days™ - $5.80
Priority Mail Express 1-Day™ - $18.10

please help =) thanks

Newbie

Posts

Joined
Fri Aug 16, 2013 2:24 am

Post by JeffroDH » Fri Aug 16, 2013 8:11 am

whaus777 wrote:Thanks for the extensions. Just one problem. The extension fixed my issue I had with <sup> tags but now it's displaying the wrong shipping times still.

Priority Mail 1-Day™ - $5.80
Priority Mail Express 2-Day™ - $18.10

should be the opposite.. example

Priority Mail 2-3 Days™ - $5.80
Priority Mail Express 1-Day™ - $18.10
I am unable to reproduce this issue. The shipping times reflect the estimated shipping times returned by the USPS API, and if USPS is returning the wrong value for whatever reason, there isn't a whole lot I can do to help you with that.

I suggest simply removing the shipping time estimates from the display entirely. You can accomplish this by placing these lines:

Code: Select all

$result = str_replace(' 1-Day', '', $result);
$result = str_replace(' 2-Day', '', $result);
$result = str_replace(' 2-3 Days', '', $result);
beneath this line:

Code: Select all

$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&gt;', '&#8482;', $result);
which is around line 12 of the mod. Following the same pattern, you can eliminate any string of characters from the display.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by whaus777 » Sat Aug 17, 2013 12:41 am

Strange.. but if it was a USPS error then you should definitely be able to re-create it.. wtf is going on this is silly. International shipping times are all correct, just not domestic.

Welp thanks for the quick fix, better than wrong times thats for sure =P

Newbie

Posts

Joined
Fri Aug 16, 2013 2:24 am

Post by whaus777 » Sat Aug 17, 2013 12:47 am

Do you know if it would be possible to just hard code the shipping times into the shipping name?

Newbie

Posts

Joined
Fri Aug 16, 2013 2:24 am

Post by JeffroDH » Sat Aug 17, 2013 3:47 am

whaus777 wrote:Strange.. but if it was a USPS error then you should definitely be able to re-create it.. wtf is going on this is silly. International shipping times are all correct, just not domestic.
The reason I can't recreate the exact issue is because USPS returns different estimates based on the time of day, and the origin and destination zip codes. Even then, the commitment estimates don't seem to be entirely consistent between individual requests. This 'feature' they've installed into the API just serves to confuse customers.

I'm currently experimenting with the ship date portion of the request. As of now, it seems to make the delivery estimates more precise (less variation between individual requests), but not more accurate (from my zip code, priority express and priority still both show 2-day delivery times when I know for a fact priority express will arrive in one).

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Sat Aug 17, 2013 3:49 am

whaus777 wrote:Do you know if it would be possible to just hard code the shipping times into the shipping name?
That information is hardcoded into the shipping names on the admin side. The display names (catalog side) are pulled from the API response, so they could be changed using a similar function to the one posted above.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by audexlab » Thu Sep 12, 2013 8:25 am

We are getting this error in VQmod Manager:
REQUEST URI : /ald/index.php?route=checkout/shipping_method
MOD DETAILS:
modFile : /home/content/51/9628651/html/ald/vqmod/xml/Hogan_USPS_7_2013_fix.xml
id : Fix USPS Rates for 7/28/2013 API Update
version : 1.3.3
vqmver : 1.0.9
author : JeffroDH
SEARCH NOT FOUND (ABORTING MOD): $result = str_replace('<sup>&reg;</sup>', '', $result);

Newbie

Posts

Joined
Sun Jul 08, 2012 2:46 am

Post by JeffroDH » Thu Sep 12, 2013 8:29 am

Do you have any other mods modifying the same files? What version of OC are you using?

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by audexlab » Thu Sep 12, 2013 9:05 am

Yes there was an edit in the file by another developer.
We restored the original
The error is gone now, but how do we get rid of of the "TM"?

Newbie

Posts

Joined
Sun Jul 08, 2012 2:46 am

Post by JeffroDH » Thu Sep 12, 2013 9:20 am

replace the

Code: Select all

 '&#8482;'
with

Code: Select all

 ''

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by audexlab » Thu Sep 12, 2013 9:24 am

Got it.
Thanks so much!

Newbie

Posts

Joined
Sun Jul 08, 2012 2:46 am

Post by JeffroDH » Thu Sep 12, 2013 9:26 am

audexlab wrote:Got it.
Thanks so much!
You're most welcome. If you haven't rated the mod, I'd appreciate it if you'd do so.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by audexlab » Thu Sep 12, 2013 9:36 am

Done *****

Newbie

Posts

Joined
Sun Jul 08, 2012 2:46 am

Post by ponch329 » Wed Sep 18, 2013 4:25 am

I just had this installed but my issues persist. Most of my products are 13 ounces and under so they qualify for First Class Mail shipping with USPS. No matter what I modify in the Shipping Extension for USPS I cant get FCM to show up as a shipping option.

Is there a bug with this latest version?

Please advise.

Newbie

Posts

Joined
Tue Aug 27, 2013 6:15 am

Post by JeffroDH » Wed Sep 18, 2013 6:12 am

I've not had any issues with this version yet. Not to say that it's perfect, but I'm not aware of any bugs at this time.
Happy to take a look at what you've got if you'll PM me some login credentials and FTP access.
Last edited by JeffroDH on Tue Oct 21, 2014 12:03 am, edited 3 times in total.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Thu Sep 19, 2013 10:16 pm

ponch329 wrote:I just had this installed but my issues persist. Most of my products are 13 ounces and under so they qualify for First Class Mail shipping with USPS. No matter what I modify in the Shipping Extension for USPS I cant get FCM to show up as a shipping option.
For everyone's reference: ponch329 had a situation where his weight classes were not set appropriately, and was therefore reporting 1 ounce as several pounds to the USPS API. He was also having some other issues due to a custom template and other mods.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am
Who is online

Users browsing this forum: No registered users and 21 guests