CRE Loaded USPS Update Jan 2011


Whoops, USPS did it again.. this time by adding in ® into their international rates.. they claim, as in the usual USPS fashion, that they didn’t change anything.. its a script issue.. Find the updated file link here or download it directly here

It was brought to our attention on Jan 4th, USPS made some changes to their API. We presented a fix to the USPS with insurance module.. Which turns out would not work with CRE Loaded.. CRE Loaded took part of our fix which addressed some of the issues.. Missing, 5 international options.. We have redone the USPS module which should work in all versions on CRE Loaded.

Log in to admin. Visit – Modules – Shipping – Select United States Postal Service Module and uninstall/remove it it is installed

Unzip our file,
Upload the includes folder to your current sites store folder (which will include an includes folder)

Revisit admin, Modules- Shipping
Find United States Postal Service.. install it.. edit button- Now check which shipping options you want to offer Your customers. Keep in mind, GXG has 3 methods which should typically all return the same rates. You would not want to offer all three.. nor would you want to offer all the Priority methods.. It depends on your store products. If you only sell stickers that fit into USPS flat rate envelopes, the ENV option would be for you.. If all your products ship in boxes, only select the default methods such as PMI (Priority Mail International)

What’s new in 3.7?

*Admin has full control over all International shipping options

*Provided our webtools developer USPS ID.. You no longer need to create one.

*If you want to create one, the url has been updated to

*Shortened the defines displayed for international options (so all available options can be included in the database limit of 255 characters)
GXG=Global Express Guaranteed
PMI=Priority Mail International
EXI=Express Mail International
FR=Flat Rate
BoxSM= Small Box BoxMD= Medium Box BoxLG= Large Box

*Changed all international arrays to use the same naming system

*Added comments to line 339. This is where you would replace fullemailaddresshere with your real email address.. this is very handy to debug issues on rates.. Also a nice tool to see when someone requests a shipping quote from the site

About: Jason Miller

this is my profile page, all mine


  1. lwitzel says:

    So, how do I download this module?

  2. Paul says:

    This module is not working properly. The International shipping rates are still not displayed and the customer does not get charged for shipping if they are outside of the U.S. Also, the description for the Parcel Post shipping option is displaying like this:
    “Parcel Post<sup>&reg;</sup>”

    Please advise.

  3. Paul says:

    Hi Jason, I am running CRE Loaded Professional v6.3.3. I did uninstall the module, then uploaded the new files, and then reinstalled the module, but I am still experiencing the same issues. I have provided the link to my website for you to check it out.

    • Jason Miller says:

      The module itself works.. even for international.. but it looks like usps is sending back changed classes

      Global Express Guaranteed&lt;sup&gt;&amp;reg;&lt;/sup&gt; (GXG)**
      in place of
      Global Express Guaranteed (GXG)

      I will provide a full fix shortly.. and usps will likely change it again

      • Paul says:

        Hi Jason, I see that you have updated the shipping module, so I downloaded, uninstalled, reinstalled, but unfortunately it doesn’t look like it made any difference. The Parcel Post option for domestic orders is still displaying that garbled code, and when you select another country besides United States, the rates are not displayed.

        • Paul says:

          Hi again Jason, I apologize, I made a mistake! When I unzipped the latest file, it created it in a different folder than the previous file, and I accidentally uploaded the original file! Anyway, I “officially” installed the latest version, and it did clear up the garbled code for Parcel Post, however, when I try to get rates for another country besides the United States, the rates ARE loading, however, First Class Mail Internatonal is not displayed even though I have that option selected, and I am also seeing several lines of the following erro code on the page:

          Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘a’ in /home/xxxxxxxx/public_html/includes/modules/shipping/usps.php on line 468

          Do you know how I can fix that?


    • Jason Miller says:

      I do see the error in my php error log.. you can comment out that line by adding // in front of the code

      I will be updating the file shortly

  4. Jason Miller says:

    File has been updated.. only including the includes/modules/shipping/usps.php file

    • Paul says:

      Hi Jason,

      Thanks for the update, this appears to have addressed the issues. However, I have heard from a few customers, specifically non-U.S. customers, that say when they get to the checkout page (I am using 1-page checkout), only the highest cost shipping method is selected by default, and they are not able to select any of the cheaper shipping methods. I was unable to reproduce this myself, but it must be affecting many users because I noticed a big drop in sales since I updated the module, and all of my non-U.S. orders are coming through with Global Express Guaranteed as the shipping option by default, which never happens, as most customers choose First Class Mail International. Do you know what could be causing this problem? As I said, I was unable to duplicate it, since when I place a test order, the cheapest method is selected by default, and I am able to select other methods via the radio button. Any suggestions?


  5. Rakeh says:

    USPS shipping module is not working for Canada address.

    giving me as below
    An error occurred with the USPS shipping calculations.
    If you prefer to use USPS as your shipping method, please contact the store owner.

  6. Paul says:

    Hi Jason,

    I now have a better understanding as to what is going on with the shipping methods and pricing. The problem with the wrong shipping option being calculated in the total is happening to U.S. customers as well. Here is the issue. You ARE able to select the different shipping options using the radio buttons, however, when you scroll down to the bottom of the page to view the totals (using one page checkout), when Parcel Post is selected, it adds the Express Mail rate in the total. This seems to be the case when you have the Express Mail, Priority Mail, Parcel Post, and First Class Mail shipping options checked in the admin/module/shipping. If you de-select Express Mail and just have the other three as available options, then the Parcel Post method gives you First Class Mail in the total. This is using the latest update that you provided on the 5th. Can you confirm if this is happening on your end as well?


  7. Jason Miller says:

    what version of creloaded are you using?

  8. dubyabee2 says:

    I’ve used the latest 3.8 download from CRELoaded. It now allows Canadian addresses without crashing. Unfortunately it is not adding the handling fee to the total. I am using 6.4.1a

  9. Paul says:

    Hi Jason,

    The latest file looks like it has fixed the problem, however, now First Class Mail International does not display as a shipping option, even though I have it checked in the module. Do I need to change something with line 77 again in order to get it working?


  10. Jason Miller says:

    you can try changing
    ’1st-Class Mail Int’ => ‘First-Class Mail International’ . $this->FirstClassIntType
    '1st-Class Mail Int' => 'First-Class Mail International Package**'

    • Paul says:

      Hi Jason,

      That worked! Thank you so much for all of your help and dedication in getting this to work for me, I sincerely appreciate it!

      Best regards,

      • Brian says:


        Great work, this worked for me on 6.4.1a; thanks! Is there any way to modify the display text of the various service types? Specifically, I want to remove ‘Package**’ from ‘First-Class Mail International Package**’ when the string displays to a user on the shipping selection page.


    • USPSsucks says:

      1st-Class Mail Int isn’t working for me. Changing it to ‘First-Class Mail International Package**’ didn’t help either. Any other ideas?

    • Paul says:

      Hi Jason,

      I didn’t even realize this was a problem until now. It seems that when the USPS did the last update in January 2012, the First Class Mail International is not displaying during checkout. I had this same issue last year, and here’s how you told me to fix it:

      you can try changing
      ’1st-Class Mail Int’ => ‘First-Class Mail International’ . $this->FirstClassIntType
      ’1st-Class Mail Int’ => ‘First-Class Mail International Package**’

      That did fix the issue for me back then, however, this no longer seems to work. I tried to change the code back the original way but that just gives me an error instead of the rates loading. Any ideas?


  11. Jason Miller says:

    Glad it worked for you.. I would have had it fixed sooner had I not been having to prepare for an office move.

  12. Jeff Skinner says:

    OH MY GOD!!!! I just spent 11 hours pulling my hair out and loosing many, many $$ dollars to this issue and thought it was something completely different! So disgusted… Yet really really happy to find this posting and thankful for your work on this. ARGHHHH…

    I wonder why this was not posted in the admin section as an emergency message to all cart admins? (they can do that can’t they?) Like where it lists the upgrade to 6.4.1 etc.

    PS I am at 6.4.0a Pro if it matters

    A huge THANK YOU for saving my day!

  13. Jason Miller says:

    your can try this
    find around line 156

    $methods[] = array('id' => $this->getID($type),

    and above it add
    $title = str_replace('**', '', $title);

    you can replace ** with whatever changes you want/need to make

  14. debbie says:

    oh dear, i’m still on 6.2 and we can’t do any international orders right now because the usps shipping module no longer works. Upgrading to 6.4 is a nightmare scenario because of the mods we’ve made to the software. i have a feeling creloaded isn’t going to do anything for 6.2 on this for a long time. any advice, folks? this is real bad for us.

  15. Sheryl says:

    I don’t get many international orders, but got one today. I have updated the shipping module before and was following your instructions but the link is says it is 3.8c but the download is 3.7. Am I doing something wrong? I also still have 6.2 and am not upgrading. HELP.

    • Sheryl says:

      Forgot to mention, I was refering to when had do last change, last year for having udated before. My Intnernational Shipping is not working.

    • Jason Miller says:

      if you have downloaded from
      and installed the latest version, you have nothing to worry about.. as long as it works
      Are you seeing the version at admin – module – shipping?

      • Sheryl says:

        Yes, I said I don’t get many international orders on my website. I followed your link and downloaded and opened it and it says it is version 3.7 and not version 3.8c as the webpage is titled. My shipping is store-module-shipping. I did remove the old usps.php and uploaded the new one and I get version 3.7. This does not show the International Mail First Class rate which is all I need when a customer checks out. Can you help?

  16. Spankyxeon says:

    When I go to install this it still says

    United States Postal Service v3.0.4

    Am I missing something?

  17. Jason says:

    because the fix was done in a hurry.. and didn’t include the language text defines… you can change the define (not included)
    line 13 or so

    define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'United States Postal Service v3.0.4<br><br>You will need to <a href="" target="_blank">register for a USPS account</a> to use this module.<br><br>USPS uses pounds and ounces as weight measure for your products.');

    change the v3.0.4 to 3.7 is so desired

  18. Jeff says:


    Just setting up 6.5CE and it doesn’t appear that there’s any USPS insurance – was a bit confused by the statement at the top where it sounds like it should have insurance now. What is the status on that?


  19. Bhanuprasad Kunde says:

    Hello Jason,

    I am using loadedcommerce 6.5 B2B cart. I want to add cke-editor to the front end of cart to the comments section. Is it possible to add. If yes then can you please guide me.

    • Jason Miller says:

      I have never seen it done..(and not sure why you would want to.. and it might be a security issue that would allow injections and is likely blocked from containing html/script) I am deleting this comment as it serves no relation to the topic USPS update
      You can always use the forums or open a support ticket

Leave a Reply