Jump to content
bad_lemming

[Contribution] - USPS Methods

Recommended Posts

i just installed wkdwiches latest contribution and done the sql changes in the readme which got rid of the errors in the admin panel and made the international shipping options show up but i still get this at checkout for both international addresses and domestic addresses - An error occured with the USPS shipping calculations.

 

any way i can fix this or any ideas how to find the root of the issue

Share this post


Link to post
Share on other sites

i just installed wkdwiches latest contribution and done the sql changes in the readme which got rid of the errors in the admin panel and made the international shipping options show up but i still get this at checkout for both international addresses and domestic addresses - An error occured with the USPS shipping calculations.

 

any way i can fix this or any ideas how to find the root of the issue

 

what version of osc are you running?

 

Make sure you are not shipping to your own address :)

Make sure the products you put in your cart have weight and shipping shows up for other choices (flat rate etc..)

make sure your Shipping/Packaging

Country of Origin

Postal Code

are both properly set

Make sure you have the proper user name and password for your USPS account are entered

Make sure you are set to Production not Testing

 

Check ALL of the rate options to test

Turn on reporting:

Line 445 & 445

uncomment each (remove the // at the begining)

change user@localhost.com to a valid email address in 4 places total with those 2 lines and see what you get back from USPS when you go to your checkout page


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

OK - Debbie, Jetta, or whoever may be able to help,

 

I get a bit antsy when it comes to the SQL code. AFAIK, there's no way to roll that back if doesn't work (without a full backup and restore, and those are always scary!). Plus, the new contrib is a bit unclear in the README file:

 

6. SQL changes

 

I cannot locate the sql statement but this is what it needs to look like:

set_function text latin1_swedish_ci Yes NULL

 

Phpmyadmin

configuration table --> structure

edit set_function from 255 to 1020

 

Can anyone elaborate on this? It appears to be a parameter that one sets in PHPmyadmin rather than submitting a SQL statement. When I click on "Structure" for the "configuration" table, I see a line beginning with "set_function" (the last line) and the columns do correspond to "text", "latin1_swedish_ci", "Yes", and "NULL". There's also an icon I can click that stands for "Change". How easy is it to undo this if it doesn't work? In addition, is there any way I can tell whether it's set for 255 or 1020 already?

Edited by TomB01

Share this post


Link to post
Share on other sites

Can anyone elaborate on this? It appears to be a parameter that one sets in PHPmyadmin rather than submitting a SQL statement. When I click on "Structure" for the "configuration" table, I see a line beginning with "set_function" (the last line) and the columns do correspond to "text", "latin1_swedish_ci", "Yes", and "NULL". There's also an icon I can click that stands for "Change". How easy is it to undo this if it doesn't work? In addition, is there any way I can tell whether it's set for 255 or 1020 already?

 

I think it might depend on what version of SQL you have installed and or the operating system of the server.

 

You are correct, when you click for the stucture of the CONFIGURATION table that is what it says. You click that row or check the box on the left side then the little "pencil to edit.

Drop down the box and choose VARCHAR, enter 255 in the box, SAVE

then I went back in and change 255 to 1020 and it reverted to TEXT, but everythig was fine after that.

 

This particular change really should not give you the willies :) And yes you can roll it back by just editing again and changing it back to what you had.


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

Cool. This works too. Although for United States Priority I get the following text: Priority Mail (1Estimated transit: Day).

 

Also for the SQL code, try the following:

 

ALTER TABLE `configuration` CHANGE `set_function` `set_function` VARCHAR( 1020 )

Share this post


Link to post
Share on other sites

Cool. This works too. Although for United States Priority I get the following text: Priority Mail (1Estimated transit: Day).

 

Also for the SQL code, try the following:

 

ALTER TABLE `configuration` CHANGE `set_function` `set_function` VARCHAR( 1020 )

 

Thank you that was what I was looking for.. everytime I try and write something for sql, it fails.. as simple as that looks it just will not compute in my head :)

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 think it might depend on what version of SQL you have installed and or the operating system of the server.

 

You are correct, when you click for the stucture of the CONFIGURATION table that is what it says. You click that row or check the box on the left side then the little "pencil to edit.

Drop down the box and choose VARCHAR, enter 255 in the box, SAVE

then I went back in and change 255 to 1020 and it reverted to TEXT, but everythig was fine after that.

 

This particular change really should not give you the willies :) And yes you can roll it back by just editing again and changing it back to what you had.

Apparently, I have no trouble with the configuration table structure, because it appears to be working. I need to do some more testing, but good job!!

 

I've got those double asterisks after First Class International, and wondered if you knew how to fix this on Domestic:

 

Priority Mail (1Estimated transit: Day)

 

As you can see, it's putting a "1" at the head of the transit string, with no value for the "Day". I believe Priority Mail is pretty much the same transit time as First Class for Domestic, but I can't remember for sure. Anyway ... help is appreciated.

 

 

EDIT: Hmm ... didn't see that a.forever had the same error before I posted.

Edited by TomB01

Share this post


Link to post
Share on other sites

Priority Mail (1Estimated transit: Day)

 

Yes I saw that at first but when I refreshed it went away. According to the code as I read it (amature+ at best) I dont see how that could be happening.. and sorry I did not see a.forever had that issue either.. in my mind even if it stayed, it was a small price to pay for a working module :)

 

As far as the ** after the first class int'l thats nothing more than a label to signify "varies by country" for the transit time


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

 

Any way to add handling charges for International?

 

I'd love that, but I can't handle it myself.. if someone wants to start stabbing at it, I will be happy to test.. it was never there to begin with


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'd love that, but I can't handle it myself.. if someone wants to start stabbing at it, I will be happy to test.. it was never there to begin with

 

So I have waited till now because my domestic has been working fine. Is there a clean full package to install thats working.

Share this post


Link to post
Share on other sites

If you mean fully functionable for the recent changes from USPS yes: http://addons.oscommerce.com/info/487

 

if you are looking for one that has handling for international, no. one working module did have handling, but it was 1 amount for everything, ni options for the different rates

 

and so far there has only one one report of this not working (5.0.3)


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

Unfortunately i am completely LOST with this statement for USPS Methods 5.0.3 in the read me file:

 

6. SQL changes

 

I cannot locate the sql statement but this is what it needs to look like:

set_function text latin1_swedish_ci Yes NULL

 

Phpmyadmin

configuration table --> structure

edit set_function from 255 to 1020

 

how exactly do i do this?

 

take care,

 

gavin / stickfigure

Share this post


Link to post
Share on other sites

see a.forever's reply up above.. you may not need that or you may.. chances are you will

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

Having a weird problem and no international...

 

Installed 5.0.3 (upgraded from 2.something), modded the files, uploaded everything, ran the SQL stuff, made sure origin is correct.

 

The issue is domestic methods show up fine for zip codes close to me but if I use a test address that is real, but is further away (i.e. different zip = different rate), no methods show up.

 

And I'm still not getting any international methods to show up at all.

 

I have received no errors while installing and even rolled back to the older files and redid everything. Same result.

 

Any ideas or other things to try possibly? Any help is greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
Installed 5.0.3 (upgraded from 2.something), modded the files, uploaded everything, ran the SQL stuff, made sure origin is correct.

 

There is a small extra step people must take if upgrading from v2.x and the instructions for that can be found in v4.3.2. If you jumped from v2.x to v5.0.3, then you'll run into errors.

Share this post


Link to post
Share on other sites

There is a small extra step people must take if upgrading from v2.x and the instructions for that can be found in v4.3.2. If you jumped from v2.x to v5.0.3, then you'll run into errors.

 

My thoughts are that users tend to stick with whatever version they have that works until the time comes when they are forced to upgrade to a newer version to get it working or add the features they want in a newer version.

 

I highly recommend the instalation.txt or readme.txt file for 5.0.3, and follow-ons, includes the steps required for upgrade from all the previous versions. This may sound daunting, but maybe it can be stated such that you ask the user to find a range of code lines (begining line and ending), delete all lines after the beginning line and before the ending line, and then add "the following code" after the beginning line. There may be better ways to word this.

 

There have been so many contributions to USP Methods over the years that have intolerably confused the situation regarding changes to files other than the usps.php code and language files. A new and better way to install USPS Method updates is required in light of the fact that the USPS has been screwing us up yearly with their changes.

Share this post


Link to post
Share on other sites

Unfortunately i am completely LOST with this statement for USPS Methods 5.0.3 in the read me file:

 

6. SQL changes

 

I cannot locate the sql statement but this is what it needs to look like:

set_function text latin1_swedish_ci Yes NULL

 

Phpmyadmin

configuration table --> structure

edit set_function from 255 to 1020

 

how exactly do i do this?

 

You probably don't have to do anything with Swedish. I didn't.

 

Ok, seriously. This is what you do:

 

Start PhpMyAdmin. This is a Web-based utility for manipulating databases. Talk to your hosting provider if you need help starting it.

 

There's a column on the left that lists your databases. Click on the one for the database associated with your shopping cart. If you don't know the name, you can find it in your catalog/includes/configure.php file. So, if you see a line like "define('DB_DATABASE', 'gtd_oscomm');" there, you want to click on "gtd_oscomm".

 

The information for your database will pop up. You should get a list of all the tables in your database. If you don't, click on the tab with the "Structure" label.

 

You want to edit the structure of the "configuration" table. Find it. It should be about #8 in the list of tables. Click on the "Browse" icon or the size link for that table.

 

A list of eight fields will pop up. One of them is the "set_function" field. Click on the "Change" icon (looks like a pencil) for set_function.

 

A list of the attributes for the field will pop up. Set the "length/values" attribute to 1020. According to information here, you may also need to change the "type" attribute to "varchar" or "text". Click the "Save" button.

 

Hope this helps!

Share this post


Link to post
Share on other sites

There is a small extra step people must take if upgrading from v2.x and the instructions for that can be found in v4.3.2. If you jumped from v2.x to v5.0.3, then you'll run into errors.

 

Thanks for that. Ran the SQL statement and now for close zip codes it comes up with the standard error:

"An error occured with the USPS shipping calculations.

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

 

For farther zips and international, it still displays no options.

 

EDIT:

I removed and re-installed the module in admin and now for close zips it is working correctly (no errors). However, for farther zips and international I'm still not seeing any options. So the same problem as first posted :(.

 

Any other ideas? I find it strange that it's working for zips that are the base postal rate. I've checked and unchecked different methods and tried a bunch of different addresses, again only the close zips work.

Edited by teknorc

Share this post


Link to post
Share on other sites

Ughhh....

 

OK, just so nobody else does this...

 

Make sure your shipping zone is set to 'none' in the module if you want to ship outside your shipping zone. For some reason my shipping zone was 'California'. So it wasn't closer zip codes, it was anything with CA that was working. I now have all international options and domestic options showing for any address.

 

Sorry for the bother, but if my idiocy can help someone out there having a similar issue, then great. Thanks for the help!

Share this post


Link to post
Share on other sites

Had some success finally with USPS Methods. Everything is working in One Page Check out.

 

Is anyone working on implimenting the user selectable insurance.

 

I tried to get the Insurance 1.5 working but it is not compatible with one page checkout and templates code.

Does anybody know how to get this working?

Share this post


Link to post
Share on other sites

Any way to add handling charges for International?

 

Same question here.

 

Previously, there was the ability to add a flat handling charge that applied to all shipments.

 

I see there is now the ability to control handling by service type, but only for domestic. There is no way to add handling to an international order, which is the only thing we use USPS for.

 

Also, more work is required to ship internationally, so having it for domestic and not international is counter-intuitive.

 

Some attentention to this would be greatly appreciated. I'd take a stab at it, but my PHP skills are very basic.


Gary

Share this post


Link to post
Share on other sites

Same question here.

 

Previously, there was the ability to add a flat handling charge that applied to all shipments.

 

I see there is now the ability to control handling by service type, but only for domestic. There is no way to add handling to an international order, which is the only thing we use USPS for.

 

Also, more work is required to ship internationally, so having it for domestic and not international is counter-intuitive.

 

Some attentention to this would be greatly appreciated. I'd take a stab at it, but my PHP skills are very basic.

 

Good things come to those that wait :) Apparently USPS has other changes coming in May and one of our members here is working on preparing for that whilst adding handling for international and better insurance dealings.. I have a file to test for them tonight as a matter of fact.. so hang tight it's coming


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

Has anyone figured out how to get the trademark legends to show AND get the methods to apply to the cart. I am having a hell of a time with that, and I need to get it to work correctly. I can get one or the other, but not both. If anyone can get it working with the legends being visible, then please share. I've stepped away from that for now and I'm working on other things. But, it needs to be fixed to be compliant with USPS terms of service. If nobody else has the solution, then I'll go back to it with a clear head in a few days.

Share this post


Link to post
Share on other sites

Looks like the new USPS Methods 5.0.3 blew up my order editor. I get this message when clicking on "Edit" for an invoice:

Fatal error: Call to undefined function: tep_round_up() in D:\home\xxxx\xxxx\oscommerce2\catalog\includes\modules\shipping\usps.php on line 141

 

Can someone help me get my invoice editor back online (order_editor_5_0_61)?

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

×