Jump to content
fulluvscents

USPS Rate V4, Intl Rate V2 (official support thread)

Recommended Posts

It appears that no checking is done to see if the array exists. Try adding this just before line 124:

          if (tep_not_null($Package['ExtraServices']['ExtraService']))

Regards

Jim

 

Outstanding!

 

Both the UK test address and my customer's address from the Netherlands now works with no errors!

 

Many thanks, Jim!

Edited by TomB01

Share this post


Link to post
Share on other sites

It appears that no checking is done to see if the array exists. Try adding this just before line 124:

          if (tep_not_null($Package['ExtraServices']['ExtraService']))

Regards

Jim

 

 

This line above replaces: foreach ($Package['ExtraServices']['ExtraService'] as $key => $val) {

 

Correct?

Share this post


Link to post
Share on other sites

Try adding this just before line 124:

 

When a problem appears, it is rare that you find reports from others with the exact same issue. It is even more unusual to find a simple fix which works immediately. Our UK clients were getting the same USPS module error which was mentioned here earlier by @TomB01. Thank you @kymation for providing the quick solution!!

Edited by JetSet27

Share this post


Link to post
Share on other sites

The 13oz. limit is coded into the USPS module. You'll need to modify that code.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Yes it requires commercial rates. Beware the Online vs. Retail as that also changes the rate structure.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

This may be an easy fix but I am do not where to start. This is a fresh install

 

error reads:

 

1406 - Data too long for column 'configuration_description' at row 1

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Methods (Domestic and International)', 'MODULE_SHIPPING_USPS_TYPES', '0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00', 'Checkbox: Select the services to be offered
Minimum Weight (lbs)first input field
Maximum Weight (lbs):second input field

USPS returns methods based on cart weights. These settings will allow further control (particularly helpful for flat rate methods) but will not override USPS limits', '6', '0', 'tep_cfg_usps_services(array( \'First-Class MailRM Stamped Letter\', \'First-Class MailRM Large Envelope\', \'First-Class MailRM Parcel\', \'Media Mail Parcel\', \'Library Mail Parcel\', \'USPS Retail GroundTM\', \'Priority MailTM\', \'Priority MailTM Flat Rate Envelope\', \'Priority MailTM Legal Flat Rate Envelope\', \'Priority MailTM Padded Flat Rate Envelope\', \'Priority MailTM Small Flat Rate Box\', \'Priority MailTM Medium Flat Rate Box\', \'Priority MailTM Large Flat Rate Box\', \'Priority MailTM Regional Rate Box A\', \'Priority MailTM Regional Rate Box B\', \'Priority Mail ExpressTM\', \'Priority Mail ExpressTM Flat Rate Envelope\', \'Priority Mail ExpressTM Legal Flat Rate Envelope\', \'First-Class MailRM International Letter\', \'First-Class MailRM International Large Envelope\', \'First-Class Package International ServiceTM\', \'Priority Mail InternationalRM\', \'Priority Mail InternationalRM Flat Rate Envelope\', \'Priority Mail InternationalRM Small Flat Rate Box\', \'Priority Mail InternationalRM Medium Flat Rate Box\', \'Priority Mail InternationalRM Large Flat Rate Box\', \'Priority Mail Express InternationalTM\', \'Priority Mail Express InternationalTM Flat Rate Envelope\', \'USPS GXGTM Envelopes\', \'Global Express GuaranteedRM (GXG)\' ), ', now())

Share this post


Link to post
Share on other sites

@@adanob

Using your host's database management tool (usually PHPMyAdmin) change the configuration_description column in the configuration table from type varchar to type text.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks Jim,

 

That got rid of the error. 

 

Unfortunately this contribution does not show in the shopping cart. It says:

 

Shipping Method

This is currently the only shipping method available to use on this order.

Add Comments About Your Order

Share this post


Link to post
Share on other sites

Then you did something wrong somewhere. Did you enter a valid USPS Web Tools account in the Admin setup?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

No - I mistakenly uploaded the modules.php file into the incorrect directory.

 

What does this mean? Cannot redeclare class usps .......catalog/includes/modules/shipping/usps.php on line 16.....

 

The class file reads (on line 16)

 

 class usps {

    var $code, $title, $description, $icon, $enabled, $usps_weight, $xml_errors;
    // The server URL and DLL are here in case they ever need to be changed
    var $usps_server = 'production.shippingapis.com';
    var $api_page = '/shippingapi.dll';

 

where else is this declared?

Share this post


Link to post
Share on other sites

It means that you uploaded a file to the wrong place. Upload your files again, and pay attention to the folder they go in. There are multiple files named usps.php, and they are all different. Make sure that each one is in the proper directory.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

It appears that no checking is done to see if the array exists. Try adding this just before line 124:

          if (tep_not_null($Package['ExtraServices']['ExtraService']))

Regards

Jim

 

Thanks Jim, I just had my first sale to UK in a long time and got this error.  Googled it and found the same thread where you have helped me (and others) in the past. 

THANK YOU!!!!

Share this post


Link to post
Share on other sites

So the install instructions say to simply upload the directories New files and Files to Modify into your structure.

 

But in the Files to Modify it has two additional folders.  2.3.4 and 2.3.x.x

 

This will create those folders in the directory tree. Is that what is intended or are we to select which matches our installed version and only upload those?


Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Share this post


Link to post
Share on other sites

@@mdtaylorlrim

No, those are changes that you need to make to your existing files. Use the 2.3.4 directory and compare the files in there to your store. I suggest the use of a comparison program (Meld, Beyond Compare, etc.) to handle the comparison. The changes in the files are all marked.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

<admin>/modules.php.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I believe that this UPSXML module is the latest. It should work with any osC 2.3.x version. UPS is also a lot better at keeping us up with changes and not abusing their API, so you shouldn't have any problems.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

How do you install USPS Methods? (Sorry to ask, but I truly don't know.)

 

I installed oSC Responsive 2.3.4. I then downloaded USPS Methods 7.3.1 onto my computer (not my server). I changed the name of the admin folder to my admin name, and then FTP'd the [new admin folder] and the includes folders onto my server. Then when I go into my admin section, Modules-Shipping, and click Install Module, I get:

 

Warning: require_once(DIR_WS_CLASSESxml_5.php) [function.require-once]: failed to open stream: No such file or directory in /home/chickens/public_html/instrumentcreator/catalog/includes/modules/shipping/usps.php on line 20
Fatal error: require_once() [function.require]: Failed opening required 'DIR_WS_CLASSESxml_5.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/chickens/public_html/instrumentcreator/catalog/includes/modules/shipping/usps.php on line 20

Share this post


Link to post
Share on other sites

Still problems; I get this when attempting to Install Module.

 

Warning: require_once(DIR_WS_CLASSESxml_5.php) [function.require-once]: failed to open stream: No such file or directory in /home/chickens/public_html/instrumentcreator/catalog/includes/modules/shipping/usps.php on line 20
Fatal error: require_once() [function.require]: Failed opening required 'DIR_WS_CLASSESxml_5.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/chickens/public_html/instrumentcreator/catalog/includes/modules/shipping/usps.php on line 20

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

×