USPS has changed API

From AVACTIS : Ecommerce Shopping Cart Software Wiki
Jump to: navigation, search

USPS has changed their API and starting from March, 31st old type of requests will produce error. To keep the USPS module working you have to apply some changes. Follow the instruction below to do it (it works for Avactis version 2.1.1 build 10874, 10999).

1. Create full files and database backup.

2. Go to your CPanel, navigate to the phpMyAdmin section, select your database and execute the following queries: insert into asc_sm_usps_settings values (,'RT_DOM_CONTAINER', );

insert into asc_sm_usps_settings values (,'RT_INT_WIDTH', '0');

insert into asc_sm_usps_settings values (,'RT_INT_HEIGH', '0');

insert into asc_sm_usps_settings values (,'RT_INT_LENGH', '0');

insert into asc_sm_usps_settings values (,'RT_INT_GIRTH', '0');

insert into asc_sm_usps_settings values (,'RT_INT_PACKAGESIZE', );

insert into asc_sm_usps_settings values (,'DOM_PRIORITY_MAIL_WIDTH', );

insert into asc_sm_usps_settings values (,'DOM_PRIORITY_MAIL_HEIGH', );

insert into asc_sm_usps_settings values (,'DOM_PRIORITY_MAIL_LENGTH', );

insert into asc_sm_usps_settings values (,'DOM_PRIORITY_MAIL_GIRTH', );

insert into asc_resource_labels values (,'USPS','RT_INT_CONTAINER_REC','Rectangular');

insert into asc_resource_labels values (,'USPS','RT_INT_CONTAINER_NREC','NonRectangular');

insert into asc_resource_labels values (,'USPS','RT_DOM_CONTAINER_FIELD_NAME','Container (for large size only');

insert into asc_resource_labels values (,'USPS','RT_INT_WIDTH_FIELD_NAME','Width (inch)');

insert into asc_resource_labels values (,'USPS','RT_INT_HEIGH_FIELD_NAME','Height (inch)');

insert into asc_resource_labels values (,'USPS','RT_INT_LENGH_FIELD_NAME','Length (inch)');

insert into asc_resource_labels values (,'USPS','RT_INT_GIRTH_FIELD_NAME','Girth (inch)');

insert into asc_resource_labels values (,'USPS','RT_INT_PACKAGESIZE_FIELD_NAME','Package Size');

insert into asc_resource_labels values (,'USPS','RT_INT_PACKAGESIZE_REG','Regular');

insert into asc_resource_labels values (,'USPS','RT_INT_PACKAGESIZE_LARGE','Large');

insert into asc_resource_labels values (,'USPS','RT_INT_FOR_LARGE_SIZE','This section is for Large Package Size only');

insert into asc_resource_labels values (,'USPS','DOM_PRIORITY_MAIL_WIDTH_FIELD_NAME','Priority Mail Width (inches):');

insert into asc_resource_labels values (,'USPS','DOM_PRIORITY_MAIL_LENGTH_FIELD_NAME','Priority Mail Length (inches):');

insert into asc_resource_labels values (,'USPS','DOM_PRIORITY_MAIL_HEIGH_FIELD_NAME','Priority Mail Height (inches):');

insert into asc_resource_labels values (,'USPS','DOM_PRIORITY_MAIL_GIRTH_FIELD_NAME','Priority Mail Girth (inches):');

insert into asc_resource_labels values (,'USPS','DOM_EXPRESS_CONTAINER_NONE','None');

insert into asc_resource_labels values (,'USPS','DOM_EXPRESS_CONTAINER_ENVELOPE','Envelope');

insert into asc_resource_labels values (,'USPS','RT_INT_MAILTYPE_LENV','Large Envelope');

insert into asc_resource_labels values (,'USPS','RT_INT_MAILTYPE_FR','Flat Rate');

insert into asc_resource_labels values (,'USPS','RT_DOM_FOR_LARGE_SIZE','Use this section for Large container only');

insert into asc_resource_labels values (,'USPS','RT_INT_CONTAINER_FIELD_NAME','Package Size (length + girth, inches):');

insert into asc_resource_labels values (,'USPS','RT_INT_CONTAINER_FIELD_NAME_DESCR','Use to specify special containers or container attributes that may affect postage; otherwise, select None');

update asc_resource_labels set res_text = "Regular (Package dimensions <= 12’’)" where res_label = "RT_DOM_PACKSIZE_RG";

update asc_resource_labels set res_text = "Large (Package dimension > 12’’)" where res_label = "RT_DOM_PACKSIZE_LR";

3. Download two files from the Downloads section at Help Desk and upload them to the Avactis root directory on your server:

10874_USPS_patch file (https://support.avactis.com/index.php?_m=downloads&_a=viewdownload&downloaditemid=22)

usps diff file (https://support.avactis.com/index.php?_m=downloads&_a=viewdownload&downloaditemid=23)

4. Open the following link in your browser:

http://your_store_url/10874_USPS_patch.php

where your_store_url is the url of your store.

5. Clear the store cache. You can clear it using the Clear cache link in your store admin panel or by deleting all files from the avactis-system/cache directory. The second way is preferable.

Check the result.

If you experience any problems in applying the changes, please contact our support team using this form:

https://avactis.com/support.php?ftp