Jump to content
bad_lemming

[Contribution] - USPS Methods

Recommended Posts

My suggestion is to remove the module, check your database to be sure all refereneces are removed from the configuration table then reinstall after triple checking all yur files have been properly modified and uploaded tot he correct locations then reinstall


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

Re: International envelopes - it is not a problem with the install. It is a problem with the script. I missed something. I had assumed the missing responses had to do with dimensions / weights and that I was just entering something wrong in my admin panel. While looking into something else, I figured out WHY flat rate envelopes aren't showing up. I didn't realize first class envelopes were missing as well.

 

When looking at it originally, I thought it was going to require a complete redo of the international portion of the module. However, in response to this, I took another look to find out just how much work it would be.

 

Good news. It requires changing ONE word in the script.

 

in catalog/includes/modules/shipping/usps.php

 

on about line 723, change

					'<MailType>Package</MailType>'

to

					'<MailType>All</MailType>'

 

 

Flat rate envelopes will be returned. I suppose that means I have to do a new upload now. Blah. At least it was an easy fix.

Share this post


Link to post
Share on other sites

Hi,

I have read pages and page but have not found anyone with my problem. I installed USPS Methods 5.2.1 - fix string replace and the module itself is working fine but I am now not able to edit any modules in the admin panel. When I click edit, the panel just goes away, no error, just pushed the blue arrow to the far right side of the page. It happens not only to this module and to all modules. I hope someone can help with this. Thanks in advance.

Share this post


Link to post
Share on other sites

Hi - I am getting the "An error occured with the USPS shipping calculations. If you prefer to use USPS as your shipping method, please contact the store owner." at checkout. I've brought all my code up to current and have gone over it about 3 times. I have the email debugging turned on - a sample email is below.

 

I up a dump of the request being submitted. Was hoping you could look at it and see if anything is obvious. I removed the user and password. I know they are correct because they were copied and pasted from the initial USPS email. We received email yesterday that our account had been connected to the production server.

 

<RateV3Request USERID="xxxxxxxxxxxx" PASSWORD="xxxxxxxxxxxx"><Package ID="0"><Service>FIRST CLASS</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size></Size><Machinable>true</Machinable></Package><Package ID="1"><Service>MEDIA</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size>REGULAR</Size><Machinable>true</Machinable></Package><Package ID="2"><Service>PARCEL</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size>REGULAR</Size><Machinable>true</Machinable></Package><Package ID="3"><Service>PRIORITY</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size>REGULAR</Size><Machinable>true</Machinable></Package><Package ID="4"><Service>PRIORITY</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>FLAT RATE ENVELOPE</Container><Size></Size><Machinable>true</Machinable></Package><Package ID="5"><Service>PRIORITY</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>SM FLAT RATE BOX</Container><Size></Size><Machinable>true</Machinable></Package><Package ID="6"><Service>none</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>SM FLAT RATE BOX</Container><Size></Size><Machinable>true</Machinable></Package><Package ID="7"><Service>none</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>SM FLAT RATE BOX</Container><Size></Size><Machinable>true</Machinable></Package></RateV3Request>

 

looks like the 1st email in a series is the not authorized followed by a series of bad request emails. Does not authorized mean what it actually says, that even though we were notified we are approved that in fact we are not?

 

typical emails:

 

<Error>

<Number>80040b1a</Number>

<Description>Authorization failure. You are not authorized to connect to this server.</Description>

<Source>UspsCom::DoAuth</Source>

</Error>

 

 

<HEAD><TITLE>HTTP Error 400</TITLE></HEAD><BODY><H1>BAD REQUEST</H1><P>Your client sent a request that this server didn't understand.<br>Request:

</body></html>

Share this post


Link to post
Share on other sites

Re: International envelopes - it is not a problem with the install. It is a problem with the script. I missed something. I had assumed the missing responses had to do with dimensions / weights and that I was just entering something wrong in my admin panel. While looking into something else, I figured out WHY flat rate envelopes aren't showing up. I didn't realize first class envelopes were missing as well.

 

When looking at it originally, I thought it was going to require a complete redo of the international portion of the module. However, in response to this, I took another look to find out just how much work it would be.

 

Good news. It requires changing ONE word in the script.

 

in catalog/includes/modules/shipping/usps.php

 

on about line 723, change

					'<MailType>Package</MailType>'

to

					'<MailType>All</MailType>'

 

 

Flat rate envelopes will be returned. I suppose that means I have to do a new upload now. Blah. At least it was an easy fix.

 

That is interesting that you bring this up - I pinpointed this line of code as a possible issue myself. The problem is that while replacing it with "All" does now allow for First Class Envelopes, it still doesn't return the Flat Rate Envelopes for International Priority or Express Mail.

 

I am wondering if it has to do with dimensions or the terms that are requested to and sent from the USPS. I noticed that if you changed the wording in any of the descriptions for the package types, that type was no longer returned. i.e. If I changed wording from "Priority Mail" to "Priority Mail Box", it no longer returned Priority Mail as an option. The question then becomes as to whether or not the wording for International Flat Rate Envelopes is correct (as a possible reason).

 

When you changed MailType to "All", did it now allow for International Flat Rate Envelopes?

Share this post


Link to post
Share on other sites

Hi,

I have read pages and page but have not found anyone with my problem. I installed USPS Methods 5.2.1 - fix string replace and the module itself is working fine but I am now not able to edit any modules in the admin panel. When I click edit, the panel just goes away, no error, just pushed the blue arrow to the far right side of the page. It happens not only to this module and to all modules. I hope someone can help with this. Thanks in advance.

 

I've seen this but I can't remember what caused it. Make sure to go back through the instructions carefully. It's either because the configuration table wasn't dumped properly before you uploaded the new file (by removing the old module first) or it's because you missed one of the /admin/ file mods. If you can't get back into it, then best option is to go back to your backup and reinstall. You did backup, right?

Share this post


Link to post
Share on other sites

Hi - I am getting the "An error occured with the USPS shipping calculations. If you prefer to use USPS as your shipping method, please contact the store owner." at checkout. I've brought all my code up to current and have gone over it about 3 times. I have the email debugging turned on - a sample email is below.

 

I up a dump of the request being submitted. Was hoping you could look at it and see if anything is obvious. I removed the user and password. I know they are correct because they were copied and pasted from the initial USPS email. We received email yesterday that our account had been connected to the production server.

 

<RateV3Request USERID="xxxxxxxxxxxx" PASSWORD="xxxxxxxxxxxx"><Package ID="0"><Service>FIRST CLASS</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size></Size><Machinable>true</Machinable></Package><Package ID="1"><Service>MEDIA</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size>REGULAR</Size><Machinable>true</Machinable></Package><Package ID="2"><Service>PARCEL</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size>REGULAR</Size><Machinable>true</Machinable></Package><Package ID="3"><Service>PRIORITY</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container></Container><Size>REGULAR</Size><Machinable>true</Machinable></Package><Package ID="4"><Service>PRIORITY</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>FLAT RATE ENVELOPE</Container><Size></Size><Machinable>true</Machinable></Package><Package ID="5"><Service>PRIORITY</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>SM FLAT RATE BOX</Container><Size></Size><Machinable>true</Machinable></Package><Package ID="6"><Service>none</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>SM FLAT RATE BOX</Container><Size></Size><Machinable>true</Machinable></Package><Package ID="7"><Service>none</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>94531</ZipOrigination><ZipDestination>97520</ZipDestination><Pounds>0</Pounds><Ounces>7.04</Ounces><Container>SM FLAT RATE BOX</Container><Size></Size><Machinable>true</Machinable></Package></RateV3Request>

 

looks like the 1st email in a series is the not authorized followed by a series of bad request emails. Does not authorized mean what it actually says, that even though we were notified we are approved that in fact we are not?

 

typical emails:

 

<Error>

<Number>80040b1a</Number>

<Description>Authorization failure. You are not authorized to connect to this server.</Description>

<Source>UspsCom::DoAuth</Source>

</Error>

 

 

<HEAD><TITLE>HTTP Error 400</TITLE></HEAD><BODY><H1>BAD REQUEST</H1><P>Your client sent a request that this server didn't understand.<br>Request:

</body></html>

 

Rate V3 request means that you are using an old module. Can't help with that. Your mod is outdated and will need to be updated to USPS methods 5.2.1.

 

Not authorized to connect to this server means that you are not authorized to receive a response from the Rate V3 server (where you sent your request). It doesn't necessarily mean that you aren't on a production server at all, but not authorized for that server.

 

Update your mod to V4 compatibility (USPS Methods 5.2.1). Test it and if there are still issues, post back. Be absolutely sure to remove the old mod from your admin panel BEFORE you upload the new files or you'll run into sql conflicts between the mods.

Share this post


Link to post
Share on other sites

That is interesting that you bring this up - I pinpointed this line of code as a possible issue myself. The problem is that while replacing it with "All" does now allow for First Class Envelopes, it still doesn't return the Flat Rate Envelopes for International Priority or Express Mail.

 

I am wondering if it has to do with dimensions or the terms that are requested to and sent from the USPS. I noticed that if you changed the wording in any of the descriptions for the package types, that type was no longer returned. i.e. If I changed wording from "Priority Mail" to "Priority Mail Box", it no longer returned Priority Mail as an option. The question then becomes as to whether or not the wording for International Flat Rate Envelopes is correct (as a possible reason).

 

When you changed MailType to "All", did it now allow for International Flat Rate Envelopes?

 

You cannot change the mail type descriptions. Your request has to match the USPS response or it won't be returned at all.

 

Yes, when I changed it to "All", I received first class AND flat rate envelope methods.

 

If you are using the most updated version, then your international types array (line 75) should look like this:

 

		$this->intl_types = array(
		'Global Express' => 'Global Express Guaranteed regimark (GXG)**',
		'Global Express Non-Doc Rect' => 'Global Express Guaranteed regimark Non-Document Rectangular',
		'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed regimark Non-Document Non-Rectangular',
		'USPS GXG Envelopes' => 'USPS GXG tradmrk Envelopes**',
		'Express Mail Int' => 'Express Mail regimark International',
		'Express Mail Int Flat Rate Env' => 'Express Mail regimark International Flat Rate Envelope',
		'Priority Mail International' => 'Priority Mail regimark International',
		'Priority Mail Int Flat Rate Lrg Box' => 'Priority Mail regimark International Large Flat Rate Box',
		'Priority Mail Int Flat Rate Med Box' => 'Priority Mail regimark International Medium Flat Rate Box',
		'Priority Mail Int Flat Rate Small Box' => 'Priority Mail regimark International Small Flat Rate Box**',
		'Priority Mail Int Flat Rate Env' => 'Priority Mail regimark International Flat Rate Envelope**',
		'First-Class Mail Int Lrg Env' => 'First-Class Mail regimark International Large Envelope**',
		'First-Class Mail Int Package' => 'First-Class Mail regimark International Package**',
		'First-Class Mail Int Letter' => 'First-Class Mail regimark International Letter**'
		);

 

and your configuration line (421) should look like this:

 

		tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_INTL_TYPES', 'Global Express, Global Express Non-Doc Rect, Global Express Non-Doc Non-Rect, USPS GXG Envelopes, Express Mail Int, Express Mail Int Flat Rate Env, Priority Mail International, Priority Mail Int Flat Rate Env, Priority Mail Int Flat Rate Small Box, Priority Mail Int Flat Rate Med Box, Priority Mail Int Flat Rate Lrg Box, First-Class Mail Int Lrg Env, First-Class Mail Int Package, First-Class Mail Int Letter', 'Select the international services to be offered:', '6', '0', 'tep_cfg_select_multioption(array(\'Global Express\', \'Global Express Non-Doc Rect\', \'Global Express Non-Doc Non-Rect\', \'USPS GXG Envelopes\', \'Express Mail Int\', \'Express Mail Int Flat Rate Env\', \'Priority Mail International\', \'Priority Mail Int Flat Rate Env\', \'Priority Mail Int Flat Rate Small Box\', \'Priority Mail Int Flat Rate Med Box\', \'Priority Mail Int Flat Rate Lrg Box\', \'First-Class Mail Int Lrg Env\', \'First-Class Mail Int Package\', \'First-Class Mail Int Letter\'), ', now())");

 

If you are using a version that does not replace the trademark legends correctly, then unfortunately, I am not offering support for those versions. But, it is essentially the same thing with a different trademark string.

 

The first value in the array can be anything, but it MUST match the value in the configuration line. Only the administrator sees these values so there is no reason to change them.

 

The second value cannot be changed at all. The script is sending the correct request and is receiving the correct USPS response. If any changes were made to these portions of the script, then those changes need to be undone to get it working properly.

 

My dimensions are set to 8,8,1,0. I am getting flat rate envelopes. If I change them to 12,12,12,12, which is far in excess of anything that will fit in a flat rate envelope, then I still get the flat rate envelopes. So, I'm guessing that dimensions don't affect these envelopes. But, the array value will do that.

Share this post


Link to post
Share on other sites

Rate V3 request means that you are using an old module. Can't help with that. Your mod is outdated and will need to be updated to USPS methods 5.2.1.

 

Not authorized to connect to this server means that you are not authorized to receive a response from the Rate V3 server (where you sent your request). It doesn't necessarily mean that you aren't on a production server at all, but not authorized for that server.

 

Update your mod to V4 compatibility (USPS Methods 5.2.1). Test it and if there are still issues, post back. Be absolutely sure to remove the old mod from your admin panel BEFORE you upload the new files or you'll run into sql conflicts between the mods.

 

Posting back to 1) update the status, 2) as a suggestion for others who wind up with similar issues, and 3) with a few suggestions.

 

First thank you for putting in all this time into helping everyone fix this issue.

 

This is the part for others who come along later: I'd gone over the code changes I made 3 times. It was all correct as listed in the various instructions on the site. Yet I kept getting "You are not authorized" messages when accessing the server (after turning on debugging emails in usps.php module file). We received an email from USPS the day before letting us know we were now live on the production server. All my debugging was pointing to we were not authorized even though we'd been notified we were. After posting here I emailed USPS support about this. Their first response was contact your shopping cart provider. I replied with more details of the situation, the not authorized responses I've been receiving, etc. I next received a "Congratulations you are now live" email and USPS rates started appearing in the site's checkout page. In other words, we had been notified that we were live when in fact we were not. So if you ever wonder if that could be possible, I can tell you, yes it can.

 

As far as being on the wrong version (V3), I want to give this feedback. I am a developer, I know at least something about what I am doing. I hadn't looked at the USPS Methods addon in 2 or 3 years. It took me 5 hours of work to go through the large number of posted updates and tweaking the code to get the changes integrated and working. And still I wound up installing the wrong version.

 

It was really unclear which of the addon versions I was supposed to install. I can tell that since early January its been one tweak after the other because of the mess USPS created. That is completely understandable. But its left a situation that makes is really unclear for people coming along later to know how to get this addone working. It would be really helpful if a new package that clearly stated "If you have an existing OSC installation, this is the one to install to get up to speed with version 5.2.1 and USPS V4.", with one set of install instructions so you don't have to look at all the patches and wonder if you need to apply them.

 

The only thing I saw that night that said current was the one marked for clean installs. I didn't have a clean install so I didn't use it.

 

When you told me I was using the wrong version I downloaded the clean install and went over all the files, comparing them to my existing versions. I used the new ones but pasted in any changed sections from the existing version. Except for the admin general.php file, which I just used as provided in the clean install package.

 

I don't know about anyone else's install but on my 2.3.1 site using that general.php file displayed a number of missing function errors in the admin section. The admin general.php file distributed in the clean install is 48K in size while the one I had been using which was pretty much standard OSC 2.3.1 file was 57K in size. I found probably two dozen functions that were in the 57K file and not in the 48K file. I pasted them all into the 48K file and all the admin missing function error messages disappeared. I don't know if that is specific to my site or a general issue. Either way I had to do it and it cleaned up my problems. I'd be happy to share my revised version of general.php if that would be helpful.

 

I now have a 5.2.1 installation running V4 of USPS that appears to be working correctly. Rates are showing up in the storefront at checkout.

 

I really appreciate all the work you've done here to help everyone, including me. Please know what I said is offered with the intent of being helpful suggestions and not in any way criticism.

thank you

Share this post


Link to post
Share on other sites

Criticism is what forces people to strive for perfection.

 

At this point in time, there are probably several working websites still using the V3 server with only the minor stripping changes that were needed to remove the urlencoded marks that USPS started sending on January 2. The real wave will come in May when the V3 server is shut down completely.

 

It's odd that they would tell you that you're good to go when you are not. But, good to see that you did get it all working.

 

I've seen two different 2.3.1 scripts. The only real difference seems to be in the html codes (cosmetic), and not in the functional php code. OSC contributions are a free for all and if you think you've got a situation that others will also run into then feel free to share. Obviously one person isn't going to run into every potential problem. That's why the forum is here. If you upload, then just be sure to note the OSC version and how it differs from other packages so that people can best decide which version to install.

 

I agree that the contribution page is a mess. However, ALL of the uploads are complete packages (not patches) with the exception of the very last one. That is a change to one word in the script and I didn't feel it was worthy of taking the time to gather an entire package together. Besides that one, they are full packages/replacements for previous uploads and it is usually a safe bet to start with the most recent upload and work your way down rather than starting with the oldest and working up. If I had my way, I'd be able to delete my previous contributions each time I upload a new package, but I can't. So, the mess remains and hopefully people can read well enough to know that the modules became Rate V4 compatible with "USPS Methods 5.2.0 V4IntlV2 Compatible" and that subsequent contributions are enhancements to that version. I DO SEE how people could mistake the full packages for "patches", except that for the most part, I state that they are a "full package". Looks like I didn't specify that in a couple of them - oops sorry.

 

I do have a few things that have been modified/enhanced since the last upload and I will be contributing yet another package after I've made enough changes to justify a new upload. When I do, I'll make sure to specify that it is a full package, that it is Rate V4 compatible and meets all USPS legal requirements. Hopefully that will eliminate confusion. I would certainly rather see people successfully downloading and installing the correct version than spending days and sometimes weeks trying to get things sorted out.

 

Thanks for the insight. It is always welcome.

Share this post


Link to post
Share on other sites

Hi

 

To further clarify: for some reason I've bee having issues with both of the compression software programs I use. They don't work the way they are supposed to *in some cases*. They are both well known freewares. The other night I opened every contribution that said full package but saw only the instructions page in all but one. I was scratching my head wondering if the actual files had been removed so people wouldn't install the wrong package. I later went back with the other compression software and all the files were there in all the packages, just as you said in your reply. I just had been unable to see them, and I didn't think to ask for a second opinion. I think that additional hassle was necessary to give me the full blown frustration experience.

 

I couldn't understand why USPS told us we were live when we weren't either. I didn't submit the original request. I wondered if somehow two requests had gotten submitted and they approved the wrong one. I asked in my email to them if the account they'd notified us was turned on was in fact the user ID of the original request email I had. They didn't answer that, just made the one I asked about live. So I don't know whether they made a mistake. It just works now, which is all I care about.

 

I will try to follow this topic so I keep posted on further changes you make. I understand that USPS changes are ongoing and this situation will repeat from time to time. If I have anything to add I will do so. At this point everything is working correctly. By the way, the functions I found missing in the admin general.php were straight php, not HTML. I did the original install with the original announcement of 2.3.1. Perhaps some changes have been made since then.

 

As far as criticism, maybe its semantics. I just wanted to be clear I was not in any way saying you should have done a better job or anything of that sort. There is always room for improvement - that's a given. Just wanted to be clear it was not personally directed at you as if you could have done better.

Share this post


Link to post
Share on other sites

Hey Everybody,

 

thanks for the help with my post from a month + ago.

 

Sorry about the delay in responding but it has been busy around here.

 

I have to check updates in 4.3.2 as well to fix everything. I have been using flat rate for Domestic shipping.

 

Maybe this will be fixed by March! LOL.

 

take care,

 

gavin / stickfigure

Share this post


Link to post
Share on other sites

Hey Everybody,

 

thanks for the help with my post from a month + ago.

 

Sorry about the delay in responding but it has been busy around here.

 

I have to check updates in 4.3.2 as well to fix everything. I have been using flat rate for Domestic shipping.

 

Maybe this will be fixed by March! LOL.

 

take care,

 

gavin / stickfigure

 

LOL, gavin. The module is fixed and 4.3.2 is old news. Try 5.2.1 full package uploaded January 28 and do the single line modification added Feb 9.

 

http://www.oscommerce.com/community/contributions,487

Share this post


Link to post
Share on other sites

Okay, so, fresh install of 2.3.1 gave me the flowing errors on the shipping page:

At the top:

Warning: fsockopen(): unable to connect to production.shippingapis.com:80 in {internal address string}/catalog/includes/classes/http_client.php on line 330

And in the USPS section:

An error occured with the USPS shipping calculations.

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

 

So, after a long, fruitless journey, I decided to try 5.2.1. I followed the instructions implicitly and now, the top of the shipping page gives 4 of those errors, and the bottom says the same thing.

 

The clock is ticking before I need to make this site live or shut down my store. Any help would be most appreciated.


Tedward

Share this post


Link to post
Share on other sites

So, after a long, fruitless journey, I decided to try 5.2.1. I followed the instructions implicitly and now, the top of the shipping page gives 4 of those errors, and the bottom says the same thing.

 

Not to overlook the obvious, have you had USPS make your account live, so you are not still in test status? That won't work with OSC.

Share this post


Link to post
Share on other sites

Not to overlook the obvious, have you had USPS make your account live, so you are not still in test status? That won't work with OSC.

 

That was actually the end of the fruitless journey... I sat on the customer care line with USPS for an hour, talked to a human, confirmed that I'm set up for production.

 

Hey, here's a thought. I'm on a multi-stire server running many web sites as virtual machines. Is it possible that the reporting server is the host machine, rather than my virtual domain? IE: I registered with USPS with mydomain.com rather than host.virtualdomain.com

 

Answer: just kicked down another USPS account for the virtual domain, and I'm getting more errors.


Tedward

Share this post


Link to post
Share on other sites

That was actually the end of the fruitless journey... I sat on the customer care line with USPS for an hour, talked to a human, confirmed that I'm set up for production.

 

Hey, here's a thought. I'm on a multi-stire server running many web sites as virtual machines. Is it possible that the reporting server is the host machine, rather than my virtual domain? IE: I registered with USPS with mydomain.com rather than host.virtualdomain.com

 

Answer: just kicked down another USPS account for the virtual domain, and I'm getting more errors.

 

Erikmm was getting the same error. The problem is in server communication. My recommendation is to send the error to your host and see if you need to change the port or if there is a problem with the port. I know it took him a while to get it all sorted out, but he was able to do so through his host. Maybe we'll get lucky and he will chime in here. But the gist of it is that the problem is in the communication between your server and the USPS server.

 

He was getting the same error and this was his final post on the matter:

 

So, I finally got it to work!

 

Problem was on my host's side...a port issue.

 

The following is what you should send:

 

1. Error: fsockopen(): unable to connect to production.shippingapis.com:80)

File: includes/classes/http_client.php

Line: 330

 

2. The relevant code from includes/classes/http_client.php

Line: 330. It'll look something like this:

if (!$this->socket = fsockopen($host, $port, $this->reply, $this->replyString)) {

return false;

}

 

3. The relevant code from the USPS script:

if (!class_exists('httpClient')) {

include('includes/classes/http_client.php');

}

$http = new httpClient();

if ($http->Connect($usps_server, 80)) {

$http->addHeader('Host', $usps_server);

$http->addHeader('User-Agent', 'osCommerce');

$http->addHeader('Connection', 'Close');

......

$http->Disconnect();

} else {

return false;

}

 

You can also uncomment the email lines in the usps.php file and change the addresses to your address. Run a test and see what response you get from USPS if any. I suspect it'll be blank. Of course, put the comment slashes back after you run the test.

 

If you get specifics on something should be changed in the script itself, then let me know and I'll work on that.

Share this post


Link to post
Share on other sites

I just did a fesh install of 2.3.1 and did the drop on top install of USPS methods. I followed all the instalation instructions and have a USPS user/pass that works in production. I get the error message

 

An error occured with the USPS shipping calculations.

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

 

I find there is no field to configure the USPS password in the admin configuration so I'm pretty sure that is an issue.

 

Just thought I would throw this out there and see if anyone else has figured out a solution

Share this post


Link to post
Share on other sites

I just did a fesh install of 2.3.1 and did the drop on top install of USPS methods. I followed all the instalation instructions and have a USPS user/pass that works in production. I get the error message

 

An error occured with the USPS shipping calculations.

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

 

I find there is no field to configure the USPS password in the admin configuration so I'm pretty sure that is an issue.

 

Just thought I would throw this out there and see if anyone else has figured out a solution

 

The password is no longer required as of RateV4. http://www.usps.com/webtools/_pdf/Rate-Calculators-v1-2a.pdf section 2.1.3 and 3.1.3

 

Have you set your store zip code in your admin panel (configuration, shipping/packaging)? Are you getting any other errors?

 

If you aren't getting any other errors, your zip code is set, and the module is configured, then go to the usps.php file and uncomment the email lines, replacing them with your email address. Run a test (by trying to pull rates in checkout) and see if the email responses can give you a clue to what the issue is.

Share this post


Link to post
Share on other sites

 

Have you set your store zip code in your admin panel (configuration, shipping/packaging)? Are you getting any other errors?

 

 

 

That was the answer no zip code defined!

 

Thanks I'm glad I asked I was about to start down the path of providing an unnecessary password.

Share this post


Link to post
Share on other sites

I just added this update to my OSC install and everything works except I still see the word "regimark" next to the USPS Methods upon checkout.

 

I am using Dynamo Checkout as well.

 

Any advice?

Share this post


Link to post
Share on other sites

If you see regimark, then you need to do a string replace in whatever file is performing the display. I don't know the file structure of dynamo. If it is similar to the free one page checkout contribution, then you should be able to find it within the 5.2.1 instructions. If not, then that might at least give you a hint.

Share this post


Link to post
Share on other sites

As a matter of simplification, I just uploaded a full file drop for osc2.3.1. For anyone installing this into an UNMODIFIED OSC2.3.1 store, it is as simple as dropping the files into your catalog folder and following a couple of instructions. This will NOT work in any other OSC version, and is not recommended for modified 2.3.1 stores.

 

For anyone having a modified 2.3.1 store...I used this "drag and drop" version to install this add on to my somewhat modified shop but I used WinMerge to compare Fulluvscents work to what I already had first.

 

I have at least several previous add ons that would been effected by a straight drag and drop, the the file comparison utility worked very well for me in this case and the install went fairly easy.

 

Just posting this as a tip if someone wanted to go that way.


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.

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

×