Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Rate V4, Intl Rate V2 (official support thread)


Guest

Recommended Posts

Kepa:

 

I use oscommerce as well. We recently had to upgrade our USPS shipping calculator to USPSmethods 6.1a and it does work but First class mail shipping does not work. Does First class mail work (I am in the US and use First Class mail domestic) on your installation? Is so, did you do anything special that you remember to get it to work?

 

Thank you for your time.

 

Hi,

 

Thanks Jetta for helping. I am sorry that this post is about the 6 contribution but I didn't know how else to respond quickly or where. I am still going to try to finish installing this one probably this weekend, tackle the apostrophe as I think that is what is holding me up -- funny escaping it didn't work either in the admin, it had to be spelled out...

 

6.1It seems to work for me. I ship in the US also and it is my understanding the First Class is 13 oz. or under and anything else is either Parcel Post (or suggested to send, Priority Mail). So perhaps it is just a display issue? When I add an item that is just a few ounces to my cart, what shows is the following as one of the USPS options:

USPS United States Postal Service (1 pkg, 0.47 lbs total) (

---Delivery Confirmation

---Approximate delivery time from mailing date 1 day) $4.33 [select]

 

Which I have been assuming that this is First Class or Parcel Post depending on the weight, it just doesn't say it (you can probably rig an if-then so that it shows appropriately). I may be wrong, but that looks like a First Class rate (I add $1.50 in handling).

 

Hope this helps,

Kepa

Edited by kepa
Link to comment
Share on other sites

@@altoid

 

Checkboxes aren't being autofilled when the page is refreshed? So, if you save it, you lose the previous state and they become unselected, right? That would be a scripting error. I will be looking into that tonight. Thanks for bringing it up.

 

@@GoTTi

 

Hmmm, cool screenshot. I hate when that happens. Will look into that too and see if I can replicate it.

 

Retail is counter rates - what you pay at the post office.

Online is commercial rates - what you pay online

 

Use the rates that actually apply to you because the associated services are also based on how you buy your postage. In other words, don't charge retail rates if you print online unless you plan on going to the post office when someone chooses a service that isn't available online. If you buy online but want a premium rate, then add it to the handling.

 

You can exclude the weight. Someone asked that in the first day this was contributed, so find page 1 of this thread and the answer is either on that page or the next one.

 

@@kepa

 

Nope, I'm not answering questions about 6.1. I didn't write it, peeked at the code and it was far too busy for me. So, instead of messing with that, I wrote a new one from scratch. I did contribute USPS methods 5.2.2 though and might not be so hesitant to respond to questions about that one.

Link to comment
Share on other sites

ok. and i took off the weight. thanks. please add that to your zip file, maybe like a "extra mods.txt" file or something that gives us a few things we could do until you make that one of your checkbox options (if you do) ;)

Link to comment
Share on other sites

hmm now the scroll box is not there on my admin part of the catalog....its showing regular. no idea. maybe it was a issue with my browser? seems to be "lagging" on loading the admin area side panels when i click them here n there. i dunno, couldve been something on my end. but it only started to do this when i added this mod. didnt notice it the past 5 days ive been biolding this store with items.

Link to comment
Share on other sites

Alrighty, so after installing a vanilla 2.2rc2a shop and making it compatible with my server, I went ahead and whipped up a mod just for you 2.2 folks. No jquery, just a tiny bit of plain old javascript in the admin section.

 

You should find this extremely easy to install.

 

BUT, I warn you, it will NOT work unless you're on a server running php 5.2 or higher. I didn't change the core data manipulation, just the jquery stuff.

 

http://addons.oscommerce.com/info/8403

Link to comment
Share on other sites

Uploaded a new package with your first class letters. Just didn't include it. Don't know why.

 

Also noticed that the debug line wasn't commented. So, I fixed that.

 

Extra services - If you pay for them, then include them. It'll be calculated and tacked onto the cost of shipping. They aren't optional to the customer in this version. Only optional to the shop owner.

Link to comment
Share on other sites

Thanks for the First-Class Letter domestic. Hate to add-on to issues, but First-Class International Letter isn't there either.

 

I figured the extra services were forced, but I don't see their prices adding to any shipping service.

 

Edit: Additionally, It doesn't seem the max weight limit is inclusive (not that it really matters since my present workaround is to add 0.001 to the weight.

Edited by a.forever
Link to comment
Share on other sites

@@altoid

 

Checkboxes aren't being autofilled when the page is refreshed? So, if you save it, you lose the previous state and they become unselected, right? That would be a scripting error. I will be looking into that tonight. Thanks for bringing it up.

 

 

Jetta, it would be like this. In page edit I restrict some methods, and save. Next time I viist that same product in the edit page, the usps methods I previously checked are unchecked. Or maybe just one is unchecked, but the other checked.

 

However the restriction still seems to work and in the DB the restrictions show in the appropriate products field.

 

Thanks

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

but First-Class International Letter isn't there either.

 

It is now.

 

@@altoid

 

I think it's unchecking the last checkbox. I notice it too. Will work on a fix for that.

Link to comment
Share on other sites

@@jeffreyice1

 

I looked into that yesterday when I changed the mod around for the 2.2 sites, and realized that I did not add any apostrophes in the db entries. So, I think we are still at a loss on the issue you're having. I was hoping to run into something, but just haven't yet.

Link to comment
Share on other sites

@@fulluvscents thanks for this contrib, but I'm having a problem still.

 

on the page: /checkout_shipping.php

 

I get the following error:

This is currently the only shipping method available to use on this order.

 

I followed your directions but no idea why I'm not getting anything from USPS.

 

I'm using OSC 2.2RC2a

with php v 5.2.17

 

so currently no one can buy anything on the website until this issue is fixed, actually the above error I received prior to installing your contrib. I installed yours hoping it would fix the problem. Any other ideas what might cause it?

 

jeff

Link to comment
Share on other sites

Hi @fulluvscents.

 

I downloaded and installed USPS Rates V4 yesterday, on a fairly clean osc 2.3.1 install. I see the USPS rates from this contribution, the UPS rates from 'UPS XML Rates' and a flat rate, that I haven't turned off yet. When I go to pay with the Paypal express that comes with 2.3.1 I get:

Fatal error: Class 'httpClient' not found in . . . /includes/modules/shipping/usps.php on line 287

Even if I use some other shipping method.

 

Kinda looks like the class didn't get included in usps.php, but it seems like you would have picked that up long ago. Any Ideas?

 

-Jerry-

Link to comment
Share on other sites

@@jhaugen

 

Actually, I hadn't run into it until this very evening while testing something else out with PayPal express. It's a simple fix:

 

Find:

 

$http = new httpClient();

 

Add this before it:

 

if (!class_exists('httpClient')) include('includes/classes/http_client.php');

 

@@MattKopec

 

Are your php errors turned on? Is this specific to one page or another, or is it sitewide?

Link to comment
Share on other sites

@@MattKopec

 

In the usps.php file, add this:

 

error_reporting(E_ALL);

 

right before:

class usps

 

Run through the checkout and grab the error you're getting.

 

Then remove the snippet back out of the file, turn the mod off, and post back here with the error.

Link to comment
Share on other sites

Wow Jetta this sure is a hot topic! I installed the mod and got my usps account activated.

 

I still get the message "An error occured with the USPS shipping calculations.

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

 

In your mod you say to dsable the usps module in the admin tool before file modification... which I did.

 

After I edited files I reenabled the usps module... is that a mistake to do so?

 

I went through the php on the shipping module to make sure it was still sending (doesn't get edited in the mod)

and it is sending to the right address which is http://production.shippingapis.com/ShippingAPI.dll

https://secure.shippingapis.com/ShippingAPI.dll

 

I appreciate your insight on this matter.

 

Thanks so much!

Link to comment
Share on other sites

An error occured with the USPS shipping calculations.

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

 

Are you sure you're not using the USPS Methods contribution? It's not the same as this one. This one doesn't display errors. Errors are silent.

 

In any regard, there is a line that will email you the USPS response. You can un-comment that line, and first find out what response you're getting, before doing anything else to debug.

Link to comment
Share on other sites

Attached is an alternative script which MAY work for those on pre-php 5.2. It is not fully tested, but is worth a shot. Feedback is appreciated.

usps.php

Edited by fulluvscents
Link to comment
Share on other sites

hi just started to have this error tonight after doing some test checkouts that were working....

 

when i click to checkout, the page just loads then refreshes with no pricing for shipping. at the top of the checkout_shipping.php page it shows:

 

Warning: fsockopen() [function.fsockopen]: unable to connect to production.shippingapis.com:80 (Connection timed out) in /home/SITE/public_html/includes/classes/http_client.php on line 330

 

and it says

 

Shipping Method

This is currently the only shipping method available to use on this order.

 

 

 

but nothing is there....is the usps server down for maintenance or something? does this happen often? thanks

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