USPS started requiring the Originzip be passed for Canadian shipments.
B
Bob R.
started a topic
about 8 years ago
On May 31st 2015, USPS started requiring the Origin zip be passed for
Canadian shipments. To keep retuning USPS International rates you need
to make updates to cfcs/shipping/uspostal.cfc.
1. If your store is CFWebstore version 6.50 or newer you can simply replace the file cfcs/shipping/uspostal.cfc with this file: USPostal.cfc (file is zipped).
2. Or you can make the changes manually.
Replace ~line 266:
// May 2015 Update
temprequest = temprequest & 'USERID="#arguments.userid#">';
if (v.CustomerAddr.Country IS NOT 'US') {
temprequest = temprequest & '<Revision>2</Revision>';
}
else {
temprequest = temprequest & '<Revision/>';
}
Replace ~line 340:
if (v.CustomerAddr.Country IS 'US') {
temprequest = temprequest & '<machinable>#arguments.Machinable#</machinable>';
}
With this:
// May 2015 Update
if (v.CustomerAddr.Country IS 'US') {
temprequest = temprequest & '<machinable>#arguments.Machinable#</machinable>';
}
else {
temprequest = temprequest & '<originzip>#v.MerchantAddr.Zip#</originzip>';
}
To make the updates live, login to your Admin account, go to Site Design
and click 'reset cache'. This will flush the server memory and load the
new uspostal.cfc.
Now go to your shopping cart and input a Canadian address and make sure USPS rates are being returned. Here's a test address:
Bob R.
On May 31st 2015, USPS started requiring the Origin zip be passed for Canadian shipments. To keep retuning USPS International rates you need to make updates to cfcs/shipping/uspostal.cfc.
1. If your store is CFWebstore version 6.50 or newer you can simply replace the file cfcs/shipping/uspostal.cfc with this file: USPostal.cfc (file is zipped).
2. Or you can make the changes manually.
Replace ~line 266:
with this:
Replace ~line 340:
With this:
To make the updates live, login to your Admin account, go to Site Design and click 'reset cache'. This will flush the server memory and load the new uspostal.cfc.
Now go to your shopping cart and input a Canadian address and make sure USPS rates are being returned. Here's a test address:
348 Adelaide St W,
Toronto ON M5V 1R7,
Canada