Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS - Parcel, Priority, & Express -- Support Forum


AFMatt

Recommended Posts

Hello,

 

I had some issues trying to get the USPS shipping modules to work that came with OS Commerce version 2.3.3 -- it only displayed "Library Mail" which I'll never use.

 

So, I made several copies of two files:

catalog/includes/modules/shipping/usps.php

and

catalog/includes/languages/english/modules/shipping/usps.php

 

Then modified them to display only USPS First-Class Parcel, USPS Priority Mail, and USPS Express Mail. They're new files, so you can simply drag and drop them into the appropriate folders without destroying your website. Once you've uploaded them, you can select each USPS shipping method in the Admin panel (Modules -> Shipping) then "Install" each new shipping module.

 

You can also alter the text that appears in each shipping method during checkout. Just go to you Admin panel (Tools -> Define Langauges). Then scroll down until you see "modules/shipping/uspsParcel.php", "modules/shipping/uspsPriority.php", and "modules/shipping/uspsExpress.php". Click on each one to change/redefine the MODULE_SHIPPING_USPSEXPRESS_TEXT_DURING_CHECKOUT text.

 

Each USPS shipping method appears as its own shipping entity during checkout:

post-308503-0-87274700-1376777747_thumb.jpg

 

I hope this helps other people who've been running into the same issues I did.

 

Feel free to update and re-post better/modified code.

 

Thanks,

Matt

Link to comment
Share on other sites

NOTE: I just realized that the USPS 1st Class Parcel method is limited to 13 ounces (0.8125 pounds). If the total weight of the order is greater than 0.8125 pounds, nothing will show up under USPS 1st Class Parcel.

 

I noted this limitation in the language files and I also added another shipping method (Standard Post). It's pretty much identical to Priority Mail as far as price is concerned, but not limited to 13 ounces like 1st Class Parcel was.

 

New package is posted (http://addons.oscommerce.com/info/8882) as version 1.1.

 

If you know how to modify the code so 1st Class Parcel doesn't display at all (the shipping title header is still there, but text ard price are not listed), please help and re-post code.

 

Thanks,

Matt

Link to comment
Share on other sites

  • 2 months later...

Ever since the latest update at USPS, I have been unable to get USPS Shipping Methods to work. I removed it and installed this MOD and here is my problem...

 

1st - I only updated Priority Mail and the Express Mail shipping mods. I do not use Standard or Parcel so I did not upload them.

 

2nd - After running it and testing it, it seems that the Express Mail works but the Priority Mail does not. It displays on the checkout screen but it does not input any shipping costs.

 

Would anyone know what is going on with this?

 

To see it, my site is at http://www.maxatv.com

 

A test account was created using

- User Name: [email protected]

- Password: 4050

Thanks,

Scooter

Link to comment
Share on other sites

Here is th fix for Priority Mail not working...

 

Open uspsPriority.php

 

Change line 137:

 

if ((strpos($type, 'Priority Mail 1') !== FALSE) && (strpos($type, 'Flat Rate') == FALSE)) {

 

to this:

 

if ((strpos($type, 'Priority Mail 2') !== FALSE) && (strpos($type, 'Flat Rate') == FALSE)) {

 

Just changing the 'Priority Mail 1' to 'Priority Mail 2' in the above line got it to work perfect!

Thanks,

Scooter

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 3 weeks later...

I noticed Express wasn't showing the price. Here's how I fixed it:

 

In uspsExpress.php on line 137

 

change this:

 

if ((strpos($type, 'Express 1') !== FALSE) && (strpos($type, 'Flat Rate') == FALSE)) {

 

to this:

 

if ((strpos($type, 'Express') !== FALSE) && (strpos($type, 'Flat Rate') == FALSE)) {

 

All that needed to be done is to take off the " 1" and leave "Express"

Link to comment
Share on other sites

  • 1 year later...

@@AFMatt

Hello Mat i have latest version of OSC and downloaded the addon which is instructions to change priority 1 to priority 2....however i dont find the uspsPriority.php file. Where is it? thanks! Or if you have suggestions on how to get USPS shipping option to work?

I get the error. any ideas?

 

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner.

 

Thanks!

Link to comment
Share on other sites

Hi !!

 

I copy the file usps to the shipping folder and i don't have the option to install the module, it is not on the list of the modules to install,

 

any idea why i can not see it ?

 

i don't know if i have to install from another side, i just copy the file into shipping folder.

 

Thanks in advance

Link to comment
Share on other sites

  • 5 weeks later...

Hi Im getting the modules to show up but at the top in the admin area when I go to install them I see this.   Warning: include(/home/hutchaviation/public_html/store/includes/languages/english/modules/shipping/configure.php): failed to open stream: No such file or directory in/home/hutchaviation/public_html/store/admin/modules.php on line 141

Warning: include(): Failed opening '/home/hutchaviation/public_html/store/includes/languages/english/modules/shipping/configure.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/hutchaviation/public_html/store/admin/modules.php on line 141

Link to comment
Share on other sites

Hi Im getting the modules to show up but at the top in the admin area when I go to install them I see this.   Warning: include(/home/hutchaviation/public_html/store/includes/languages/english/modules/shipping/configure.php): failed to open stream: No such file or directory in/home/hutchaviation/public_html/store/admin/modules.php on line 141

Warning: include(): Failed opening '/home/hutchaviation/public_html/store/includes/languages/english/modules/shipping/configure.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/hutchaviation/public_html/store/admin/modules.php on line 141

 

Also having error saying that 

United States Postal Service - Standard Post shipping_usps.gif 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

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