Jump to content
Latest News: (loading..)
fulluvscents

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

Recommended Posts

This module doesn't have any price setting for the Extra Services. It's only None, Show, or Hide. Are you sure you have the right module?

 

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 sounds like I may have posted on the wrong support thread. My sincerest apology (although if this module works, perhaps I should switch?). Thank you!

Share this post


Link to post
Share on other sites

I updated the module per the instructions in the package and i'm getting shipping options upon checkout, but once you select a USPS shipping option and click next I'm getting the following error

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/38/10317338/html/catalog/includes/languages/english/modules/shipping/usps.php:1) in/home/content/38/10317338/html/catalog/includes/functions/general.php on line 49

 

I ran a search on this topic and found a single post regarding removing blank lines from the usps.php lang file, which I checked and didn't find any blank lines or spaces.. any help would be greatly appreciated, I've racked my head on this for like the past 8 hours before finally posting on here.

Edited by Weekend_warrior1999

Share this post


Link to post
Share on other sites

The error message says that you have blank lines or other text before the opening PHP tag on Line 1 of catalog/includes/languages/english/modules/shipping/usps.php. Go fix that.

 

If you don't see anything there, it is likely that your editor is inserting invisible characters there. Use a text editor (Notepad, etc.) or a real code editor (gedit, Notepad++, Eclipse, etc.) and you will see those characters.

 

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

You were right, I used gedit and low and behold there were hidden characters all over the file from were I had edited it with LibreOffice trying to add

 

define('MODULE_SHIPPING_USPS_TEXT_CSTRING_SHOW', 'Show Additional Options');

define('MODULE_SHIPPING_USPS_TEXT_CSTRING_HIDE', 'Hide Additional Options');

 

because it had apparently been forgotten... Should have known that.. but had a brain fart... now I only wished I had asked earlier.

Share this post


Link to post
Share on other sites

I asked a question on this thread recently and, in doing so, discovered that I was not using the most recent version of this shipping module. We have now uploaded the most recent version, but have run into a problem. When we go to our Admin Panel and click to install the module there, the "Edit" and "Remove Module" buttons show. However, when we click the "Edit" button to enter our personal settings, all of the setting fields disappear, leaving us unable to enter our settings, thus rendering the module unusable : (

 

Has anyone had this problem or have an idea of how to fix it? The previous version of this module worked fine. Thanks for any help you can provide and let me know if you need other information in order to help : )

Share this post


Link to post
Share on other sites

my 2 cents on this is:

1. when removing the old version make sure there are no traces in the database by doing a search there-in of the configuration table for USPS

1. go back thru your edits of the upgrade.. quite possible you have some section in there 2x's or in the wrong place or some such nonsense..


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

@@krdito Check that you have made the change to the admin/modules.php. That's the most common cause of failure when trying to edit.

 

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 have been notified by a customer in Russia that rates are not being generated during checkout. I attempted to recreate the problem and found the same issue. There is not error or warning message. I checked my database and have RU and RUS for Russian Federation.

Any ideas?

Thanks!

Share this post


Link to post
Share on other sites

This probably means that the address is invalid. Try entering that address into the USPS website, or call USPS and see what they say.

 

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 have fought with USPS Rate V4 for hours and it will not display the shipping costs on checkout_shipping. I have inserted my email in the module USPS.php and receive the email with information as sent from USPS production server, but no setting I have tried in admin/modules will have the information show on the checkout shipping page.

 

I have gone to the checkout_shipping.php file included in the add-on, and still nothing presents. Someone mention that I am not on the production server. The USPS account being used was a fully functioning account prior to a recent USPS change. Due to the frequent issues caused by USPS, it was decided to go with just zonal shipping until things calmed down. Now, I am redoing the site and am trying to get this add-on working again.

 

Thanks in advance

 

I should note that when installing and / or enabling other shipping modules they do appear correctly. It is just the USPS one that does not show up.

Share this post


Link to post
Share on other sites

Post the Response part of that email here and we'll take a look at it.

 

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
<?xml version="1.0",encoding="UTF-8"?>
<RateV4Response><Package ID="0"><ZipOrigination>46077</ZipOrigination><ZipDestination>46077</ZipDestination><Pounds>1</Pounds><Ounces>2</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="1"><MailService>Priority Mail 1-Day<sup>™</sup></MailService><Rate>5.80</Rate><CommercialRate>5.32</CommercialRate><SpecialServices><SpecialService><ServiceID>9</ServiceID><ServiceName>Certificate of Mailing</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.30</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.10</Price><PriceOnline>2.10</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>5</ServiceID><ServiceName>Registered Mail<sup>™</sup></ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>11.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>4</ServiceID><ServiceName>Registered without Insurance</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>11.95</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>0</ServiceID><ServiceName>Certified Mail<sup>®</sup></ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>3.30</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>13</ServiceID><ServiceName>USPS Tracking<sup>™</sup></ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService><SpecialService><ServiceID>7</ServiceID><ServiceName>Return Receipt for Merchandise</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>4.40</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>15</ServiceID><ServiceName>Signature Confirmation<sup>™</sup></ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.90</Price><PriceOnline>2.35</PriceOnline></SpecialService><SpecialService><ServiceID>19</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.20</PriceOnline></SpecialService><SpecialService><ServiceID>20</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.45</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService></SpecialServices></Postage></Package><Package ID="1"><ZipOrigination>46077</ZipOrigination><ZipDestination>46077</ZipDestination><Pounds>1</Pounds><Ounces>2</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="3"><MailService>Priority Mail Express 1-Day<sup>™</sup></MailService><Rate>19.15</Rate><CommercialRate>15.58</CommercialRate><SpecialServices><SpecialService><ServiceID>11</ServiceID><ServiceName>Priority Mail Express Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>1.00</Price><PriceOnline>1.00</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>8</ServiceID><ServiceName>Return Receipt</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>2.70</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>19</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.20</PriceOnline></SpecialService><SpecialService><ServiceID>20</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.45</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService><SpecialService><ServiceID>200</ServiceID><ServiceName>Priority Mail Express 1030 AM Delivery</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>5.00</Price><PriceOnline>5.00</PriceOnline></SpecialService></SpecialServices></Postage></Package></RateV4Response>

Share this post


Link to post
Share on other sites

The USPS response is malformed. This is very odd, since nobody else has reported this problem. In any case, find this code in the module file:

 

    $body = preg_replace( array(
	  '{<sup>®</sup>}',  /* Registered Trademark symbol - July 2013 update */
	  '{<sup>™</sup>}',  /* Trademark symbol - July 2013 update */
	  '/<br>/'
    ), array (
	  'RM',
	  'TM',
	  'BREAK'
    ), htmlspecialchars_decode($response));

 

and replace it with this:

 

    $body = preg_replace( array(
	  '{<sup>®</sup>}',  /* Registered Trademark symbol - July 2013 update */
	  '{<sup>™</sup>}',  /* Trademark symbol - July 2013 update */
	  '/<br>/',
	  '{",}'
    ), array (
	  'RM',
	  'TM',
	  'BREAK',
	  '" '
    ), htmlspecialchars_decode($response));

 

Please post the result after you apply this patch.

 

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 do not have that exact code in the module/shipping/USPS.php file. The code I have is:

$body = preg_replace(array('/\<sup\>\&reg;\<\/sup\>/', '/\<sup\>\&trade;\<\/sup\>/', '/\" /', '/\",/', '/\"<br>/', '/<br>/'), array('RM', 'TM', '",', '" ', '"<br>', 'BREAK'), htmlspecialchars_decode($http->getBody()));

 

I double checked Most current version of the add-on as well as one version back, and they are the same. If I replace this code with the code you suggested, I get nothing. The email body, and therefore $body is empty.

Share this post


Link to post
Share on other sites

The code that you quoted is the source of the problem. It is corrupting the output. I've checked the last two releases, and they both contain the code I've quoted. I don't know where you got that code, but it's not the correct version. Again, the latest release of this module is here. Go get that and try it.

 

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 installed the USPS.php file for osc2.2 on my 2.3 store and it works. Odd that the USPS.php for 2.3 does not work for 2.3. Whatever.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

There is only one USPS V4 file that currently works, and it works for both osC 2.2 and 2.3. There are obsolete versions that don't work on either. I assume you got one of those.

 

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

None, Show, and Hide.

 

The delivery time is now included in the response from USPS, in the middle of the Service name. The API doesn't allow us to change those. I don't believe this module handles that correctly in any case.

 

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

That sounds like an old version. Are you using the latest version from this addon?

 

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

Do you have all of the rate classes enabled? What product weight are you testing with?

 

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

think i got it, the mods needed to the other files didn't take right, typo's on my part.

almost....

got following error

Fatal error: Class 'httpClient' not found in /home1/newred/public_html/store/includes/modules/shipping/usps.php on line 366

Edited by MDOlds1

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

×