
Originally Posted by
mauryg
My USPS Autofill has stopped working. I just checked my install and I am using v1.3 for ZC 1.38.
The ParseIt() function in the modules/usps_autofill_button.php line 122 reads:
Code:
function ParseIt() {
//document.forms['labelInformationForm'].submit();
document.getElementById('labelInformationForm').submit();
//window.history.go(-1)
}
</script>
<script src="https://sss-web.usps.com/cns/jscript/labelInformation.js"></script>
<form target="_blank" method="post" action="https://sss-web.usps.com/cns/labelInformation.do" name="labelInformationForm" id="labelInformationForm">
but
https://sss-web.usps.com/cns/labelInformation.do is the "sign-on" page for USPS.
The actual label info is on
https://sss-web.usps.com/cns/labelSubmit.do if you just hit the "Go" button on the signon page or on
https://sss-web.usps.com/cns/signinLanding.do if you sign in first. However changing to either of these two new URLs does NOT solve the problem and only brings you to the sign on page, even if you sign in first and then hit the Autofill button. Bummer

.
I know what you are saying. I was confused for a while with that too. Actually, lableinformation.do only redirects you to the sign on page if you aren't signed in or don't pass any valid parameters. If you look at the actual address entry page, the form "POST" site is
Code:
<form target="_blank" method="post" action="https://sss-web.usps.com/cns/labelInformation.do" name="labelInformationForm" id="labelInformationForm">
and the name of the form that gets submitted is labelInformationForm
The odd thing is that hasn't changed so I'm still under as to what they may have done on the back end. USPS Autofill was a hack, a pretty good hack.. but a hack all the same. The same goes with my attempts to get it to work with Paypal's USPS form and UPS... On paypal, using the same method... only the Name city and phone number fields would load. The Address, state and other stuff wouldn't. I could never figure out why, I just assumed they had some form autoclearing javascript that loaded on the page. But there may be other powers at work that override the hack. At least if it is browser based, it should be run at the client level, after all other page scripts have loaded.
This should technically allow us to be able to make it work with multiple page steps. Then you could autofill the form, and auto-select the shipping method, etc. Should also be able to work with UPS and FedEx. THEORETICALLY