Jump to content
bad_lemming

[Contribution] - USPS Methods

Recommended Posts

Share this post


Link to post
Share on other sites

It looks like their server is having problems. Nothing to do but wait.

 

Friends of mine running OSC are having no issues.

 

Is it a contribution version issue?

Share this post


Link to post
Share on other sites

I changed the server from "production.shippingapis.com" to "56.0.34.43" in two places in my UPSP.php and it works now!

 

Mike

Share this post


Link to post
Share on other sites

I changed the server from "production.shippingapis.com" to "56.0.34.43" in two places in my UPSP.php and it works now!

 

Mike

 

Wonderful workaround. Thanks.

Share this post


Link to post
Share on other sites

hey guys & gals.. is anyone getting quotes tonight?? I am having a huge issue deciding the right way to upgrade.. I'm running an osCmax v2.0.x it already has SOME of the dimensional support, but not all of it from what I am seeing (from the UPS module) So my problem is do I move to the USPS v6.x or the v5.2.1 ???


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

I tried this from post 12 of http://forums.oscommerce.com/topic/393466-heads-up-july-28-2013-usps-name-change-for-express-mail/

 

Attached is a upgraded version of USPS Methods is based on 5.2.1. See http://addons.oscommerce.com/info/487 It is patched and current to 28 July 2013 changes. It works on 2.2, rc2a and 2.3. We've re-tested all options and services and believe they all work.

 

php.gif usps.php 52.26K 25 downloads

 

Please note the server is still set to staging. Go to lines 821-823 to reset to production.

 

You need to upload the file to modules/shipping. You need to uninstall then reinstall in Admin. Don't forget to make note of your settings before you uninstall.

 

Again this is USPS Methods Add On #487

 

It works in terms of getting USPS rates. However, as other have reported, it does not include the handling charges.

 

Does anyone have a solution for including the handling that are sent in the USPS shipping module in the admin?

Edited by blueedge

Share this post


Link to post
Share on other sites

The Message we received from USPS related to Priority services, however it appears that all my services, both International and Domestic are broken.


Gary

Share this post


Link to post
Share on other sites

ya apparently they all did.. I have table methods set up ready to turn on in a crisis so I did that already.. so now I am in the process of merging usps methods v6.1x into my osCmax v2.0.35. I decided to upgrade to the USPS Methods v6.1x because of the dimensional support (which I don't need) but more for the built in utilities that should grab the needed service name changes to drop in and reinstall. If you don't know what to do with the utility file, you can go back and read the install instructions then call the utility file in your browser. That will (should) give you the new strings that you should be able to just plop into the usps.php (includes/modules/shipping) and reinstall.. in theory that is how things are supposed to work :)


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

I tried this from post 12 of http://forums.oscommerce.com/topic/393466-heads-up-july-28-2013-usps-name-change-for-express-mail/

 

 

 

It works in terms of getting USPS rates. However, as other have reported, it does not include the handling charges.

 

Does anyone have a solution for including the handling that are sent in the USPS shipping module in the admin?

 

Just checking in and hoping FlyingKites follows up on this thread.

Yea, the new fix does not add the domestic handling fee to the quote. So far the quotes for USPS ship cost seem to be ok and also threshold for adding signature confirmation.

 

gearheadgary - I know last night USPS was down, but if you are not getting any quotes are you using a different USPS module than USPS Methods v5.2.1? Because I still got quotes with the old module. I know someone who is using USPS Rate V4, Intl Rate V2 v.1.7 and nothing is working hor him; there is another thread for this module.

 

Alan :)


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

I was using a different USPS mod until today, but since the 5.2.1 version of this has been updated so it will work, I added it to my cart. I now have USPS again! I do have a problem in that on my shipping estimator and checkout shipping page the trademarks show as <sup>®</sup> and <sup>™</sup>.

 

The install notes seem to give the fix for this, but it did not work. Here are the instructions and my results:

 

5.b. If you have shipping estimator, then modify the following. If not, then skip to step 6.

catalog/shipping_estimator.php

Find around line 70:

<td class="main" width="75%"><?php echo $method_data['title']; ?></td>

Replace with:

 

<?php

$search = array(' regimark', ' tradmrk');

$replace = array('<sup>®</sup>', '<sup>™</sup>');

?>

<td class="main" width="75%"><?php echo str_replace($search, $replace, $method_data['title']); ?></td>

 

I do have shipping estimator, but I checked shipping_estimator and shipping_estimator_popup and didn't find anything even close to:

<td class="main" width="75%"><?php echo $method_data['title']; ?></td>

I searched my entire site in DW and could not find it.

 

 

 

6. For stock checkout, modify the following (even if you have one page checkout):

catalog/checkout_shipping.php

Find:

 

<td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>

Replace with:

 

<?php

$search = array(' regimark', ' tradmrk');

$replace = array('<sup>®</sup>', '<sup>™</sup>');

?>

<td class="main" width="75%"><?php echo str_replace($search, $replace, $quotes[$i]['methods'][$j]['title']); ?></td>

This I was able to do.

 

 

7. Modify the following:

 

catalog/includes/modules/order_totals/ot_shipping.php

 

Find:

 

$this->output[] = array('title' => $order->info['shipping_method'] . ':',

 

Replace with:

 

$search = array(' regimark', ' tradmrk');

$replace = array('<sup>®</sup>', '<sup>™</sup>');

$this->output[] = array('title' => str_replace($search, $replace, $order->info['shipping_method']) . ':',

 

This I was able to do.

 

So the only change I was unable to make was to the shipping estimator.

 

I am running a heavily modified version of 2.2-MS2 on PHP5.2.8 if that helps.

 

I am no coder, but I can generally add the mods in and figure out the issues, but this one has me stumped.

 

Thanks in advance for your help.

 

Share this post


Link to post
Share on other sites

The following quote I posted on thread: USPS Rate V4, Intl Rate V2 (official support thread)

It appears that all the action is happening at this thread which causes considerable confusion. The module that is being used here (possibly temporarily) is from the USPS Methods v. 5.2.1 because the module USPS Rate V4, Intl Rate V2 v.1.7 needs to be updated. I am not sure if these modifications will work with my development site using OSC 2.3.3. Nevertheless, the modification is coming along and working with my production OSC 2.2RC2a site. There are still some bugs at the time of this writing, but it is working. You can download a copy at this thread, read a.forever's post and instructions.

 

I'm using OSC 2.2 RC2a and USPS Methods 5.2.1

 

@a.forever thanks for your work. Here are some of the problems I have encountered:

 

The assignment field for domestic handling fees are inaccurate. For example - to add in handling fee for 1st Class Mail Parcel you need to put the amount in the First-Class Mail regimark Letter field; to add in handling fee for Priority Mail you need to put the amount in the First-Class Mail regimark Large Envelope field; to add in handling fee for Priority Mail Express you need to put the amount in the First-Class Mail regimark Parcel field.

 

Alan

Edited by spiritalan

Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

I tried this from post 12 of http://forums.oscommerce.com/topic/393466-heads-up-july-28-2013-usps-name-change-for-express-mail/

 

 

 

It works in terms of getting USPS rates. However, as other have reported, it does not include the handling charges.

 

Does anyone have a solution for including the handling that are sent in the USPS shipping module in the admin?

 

I am not getting any international rates. Has anyone figured this out?

Share this post


Link to post
Share on other sites

I am working with the latest version posted on the thread mentioned a few posts above.. I am using USPS Rate V4, Intl Rate V2 v.1.7 module on several osCmax v2.0.35 and it is working just fine now.. including handling fees

 

http://forums.oscommerce.com/topic/383307-usps-rate-v4-intl-rate-v2-official-support-thread/page__st__600#entry1677015

Edited by wkdwich

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

I downloaded this usps.php file that was posted over in the V4,V2 thread, and it works with 5.2.2. I do not know if it work with 6.1. I just removed the USPS in admin, uploaded the file and reinstalled USPS, filled in the blanks and it works perfectly.

 

I am using Parcel, Priority, Express, and Int'l Priority. The quotes work. The handling fee works. The names show up correctly including the trademark symbols. I hope this helps some other folks here.

 

Thanks Jim!

 

One more try. Since the file download link is so far back in this thread, I'll repeat it here. Please post detailed results: Which services work for you and which don't? This will help me track down any bugs.

 

Regards

Jim

Share this post


Link to post
Share on other sites

a.forever I found another bug. The First Class Mail Parcel, after selecting it then continuing, brings me back to shipping page and then no other services of USPS are available. You have to go back to the cart to reinitialize the services. First Class Mail Parcel does not work.

Alan


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

@a.forever thanks. I am testing it right now. What I like about this contribution is the Signature confirmation threshold. Here are my finding so far:

 

The handling fee for Priority Mail Express on the shipping page is accurate but when I get to the confirmation page with Priority Mail Express selected it picks up the First Class Mail handling fee amount. That is, Priority Mail Express does not use its designated handling fee but rather First Class Mail's handling fee.

 

Priority Mail is doing the same thing as I wrote above for Priority Mail Express.

 

I'll keep testing for other features.


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

You may want to test this and see. Just 2 files works with my 5.2 version

 

I'll give it a whirl.

Thanks,

Alan


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

You may want to test this and see. Just 2 files works with my 5.2 version

 

Well, I tried it on my USPS Methods 6.1a by going the lazy route first - just un-installing, then copied the two usps.php files over. Like before, I have to manually punch the values into SQL with phpMYAdmin. Any changes, including my USPS account wouldn't take through editing the OsCommerce Admin (I have 2.2).

 

It sort of works, but I think the database fields from the 6.1 version are still in there and causing errors with the shipping calculations. Standard Post is referred to as Parcel in the admin setup fields but doesn't appear as an option on checkout. It looks like it's using 1st Class envelope charges for packages, too.

 

I'm going to un-install it until I can do more work on it.

Share this post


Link to post
Share on other sites

Yep - worse than before. I'll take some time today and see if I can install 5.2.2 from scratch and go from there. Hopefully, it will resolve the database, too - because now I've got semi-duplicate fields for many of the same services/options under USPS.

Share this post


Link to post
Share on other sites

You may want to test this and see. Just 2 files works with my 5.2 version

 

Here are my findings so far:

 

International works with Priority Mail International and Priority Mail Express International, it gives proper quotes and adds in handing fees.

 

With the domestic First Class Mail package, Priority Mail and Priority Mail Express it gives proper internet quotes but does not add in handling fees.

 

FlyingKites had a module and it did the same thing.

 

Then, a.forever put up a module post #621 on this thread USPS Rate V4, Intl Rate V2 (official support thread) and it adds in the handling fee but not correctly. You can read my post #622 in same thread for details.

 

Thanks again for your efforts.

 

Alan


Production:
osCommerce V. 2.3.4BS
VPS Box

Share this post


Link to post
Share on other sites

Here are my findings so far:

 

International works with Priority Mail International and Priority Mail Express International, it gives proper quotes and adds in handing fees.

 

With the domestic First Class Mail package, Priority Mail and Priority Mail Express it gives proper internet quotes but does not add in handling fees.

 

FlyingKites had a module and it did the same thing.

 

Then, a.forever put up a module post #621 on this thread USPS Rate V4, Intl Rate V2 (official support thread) and it adds in the handling fee but not correctly. You can read my post #622 in same thread for details.

 

Thanks again for your efforts.

 

Alan

I checked and you are correct. Since International is correctly adding the handling fees it should not be hard to find out why domestic is not. I will try and get to it tonight or tomorrow. Busy day today.

Share this post


Link to post
Share on other sites

I had no idea this thread existed.

 

I have Methods 6.1c working for what I need, Standard Post

 

And I have a dumb question. How do you get text boxes like the one in the post above?

 

I use osC V2.2 RC2a and PHP 5.3.10. The usps shipping module is USPS Methods 6.1c, the one by badlhby

 

It works, except for an issue with the handling charge that I haven't bore down on yet.

 

These are the lines that I changed to clear up some problems. The first problem was the XML error messages returned by USPS referenced a true false variable regarding whether the package is machinable.

 

 

near line 1130 the name parcel was changed to standard

 

// if ((strpos($service, 'First') !== false) || (strpos($service, 'Parcel') !== false)) $request .= '<Machinable>true</Machinable>';

 

if ((strpos($service, 'First') !== false) || (strpos($service, 'Standard') !== false)) $request .= '<Machinable>true</Machinable>';

 

This change fixed that. Above that line are all the other if statements referencing the different services. If you are using those, they need to be right or the page just keeps reloading.

 

 

The main problem we have is that USPS keeps messing around with names and symbols, and that means those arrays at the top of usps.php become riddled with errors, which trickle down to the error above.

 

This is the Standard Post array definitions that work for me. I wonder if this works on all sites. If anybody has it like this and it doesn't work, I would like to hear about it.

 

In the type array

 

'Standard Post®' => 'Standard Post<sup>®</sup>',

 

In the type_to_request array

 

'Standard Post' => 'Standard Post',

 

In the type_to_container array

 

'Standard Post' => '',

 

Getting these right cleared up the issue of the missing variable for title

 

<td class="main vam" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>

 

This line is found in checkout_shipping.php

Share this post


Link to post
Share on other sites

I have upgraded to version 5.2 but get a server error 500 when I hit the edit button on USPS shipping module. I think my admin/includes/functions/general.php is messed up because I can't find the code they say needs replaced. Is there a contribution out there that has this file in it? One that is compatible with version 5.2 and oscommerce v2.2? I would like to be able to edit the settings. I don't seem to have the tep_cfg_select_multioption function so I am wondering what else I might be missing.

 

Also, could it be another file that is causing the problems? I am not very literate in PHP ...

Edited by rasmusj2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×