♥kymation Posted November 16, 2013 Share Posted November 16, 2013 @@wkdwich You can leave that line as it is in the download and just turn off error reporting in your application_top.php (change the value to NONE or 0). Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
wkdwich Posted November 16, 2013 Share Posted November 16, 2013 Thanks Jim, My oscMax version has the line as: // set the level of error reporting // error_reporting(E_ALL & ~E_NOTICE & ~'E_DEPRECATED'); I see the newest version of OSC has it as: // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); as you can see, mine is NOT commented out but was still getting the chunk issue notices, so I'll leave the line commented in the usps.php file Now also as an extra note.. my oscMax is 2.0.35 and my client is running 2.5.x On his I had to turn off the display weights then I got quotes.. Mine I always turn off display weights but his he had them ON.. both carts have the display international reg's ON - both are working now.. thanks! Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com Link to comment Share on other sites More sharing options...
♥kymation Posted November 16, 2013 Share Posted November 16, 2013 Commenting out that line just leaves whatever setting is in the php.ini file. I strongly recommend that you set it to error_reporting(0); for a live store. I also remove the error messages from the database functions so the customer does not see those. I have no idea why the Display Weights would matter, but do whatever works. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
soundzgood2 Posted November 16, 2013 Share Posted November 16, 2013 I doubt this has anything to do with httpClient since this module has been working fine for a long time using httpClient. It's possible that curl is filtering out the invalid characters somehow. Curl certainly can filter out the linefeeds, and the rest is possible though unlikely. In any case, not all servers have curl enabled, so it's not a good general solution. Regards Jim Hi Jim - I'd recommend considering the following changes to the add-on: 1. adding in a check for and coding to use curl before the http_client as curl isn't as uncommon as you might think and it doesn't suffer the same issues as http_client with xml decoding (the Zencart usps module uses this configuration by default) 2. renaming the function http_chunked_decode because if the pecl http extension was installed (which includes the function http_decode_chunked), this usps add-on will cause an 'already declared' error which may be confusing to some Simon Quote About me Link to comment Share on other sites More sharing options...
ejsolutions Posted November 16, 2013 Share Posted November 16, 2013 Hi Jim - I'd recommend considering the following changes to the add-on: 1. adding in a check for and coding to use curl before the http_client as curl isn't as uncommon as you might think and it doesn't suffer the same issues as http_client with xml decoding (the Zencart usps module uses this configuration by default) 2. renaming the function http_chunked_decode because if the pecl http extension was installed (which includes the function http_decode_chunked), this usps add-on will cause an 'already declared' error which may be confusing to some Simon This sounds like a sensible plan, to me. An alternative method, at a flick of a switch. Certainly for all WHM/cPanel VPS, I have curl installed by default and PECL is used frequently. EJ Quote Link to comment Share on other sites More sharing options...
♥altoid Posted November 16, 2013 Share Posted November 16, 2013 Commenting out that line just leaves whatever setting is in the php.ini file. I strongly recommend that you set it to error_reporting(0); for a live store. I also remove the error messages from the database functions so the customer does not see those. I have no idea why the Display Weights would matter, but do whatever works. Regards Jim In my case my host requires I set up my own php.ini in the shops root folder meaning here: /public_html/php.ini given how my directory is set up. That file contains this: display_errors = Off and that that did it. Thanks for the help here. Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Chadduck Posted November 16, 2013 Share Posted November 16, 2013 Which USPS module are you using USPS Methods or USPS Rate V4, Intl Rate V2. These are not the same modules. The thread you are posting in is USPS Rate V4, Intl Rate V2. Whoops - clicked the wrong one - using USPS Methods Quote Link to comment Share on other sites More sharing options...
geremyh Posted November 17, 2013 Share Posted November 17, 2013 If I may start by saying as a new business entity I am completely happy I've chosen osCommerce. It's been a steep learning curve but I've gotten to a staple acceptable storefront. This USPS stuff on the other hand has me beyond angry, thankfully there is a broad support community. It seems the latest issue is it seems to be breaking my paypal express. I also get the warning on line 649 but when error reporting is turned off in application_top everything works fine UNTIL i try to finalize to my paypal express checkout. My checkout process wont connect, just a blank white screen. With the USPS module turned off and table rate shipping everything works fine. I'm wondering if anyone else is experiencing issues with paypal express and this USPS Rate module or should I be looking somewhere else? Thanks for any assistance Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 17, 2013 Share Posted November 17, 2013 I'm using this module on multiple sites with various Paypal modules and they all work fine. I could give you more information if you tell us which Paypal module you are using and the version of that module. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
geremyh Posted November 17, 2013 Share Posted November 17, 2013 thanks for the response. The paypal module I'm using is Paypal Express Checkout with API credentials and as I said it works fine with this USPS module turned off save for the line 649 warning. So double checking with error turned back on i see this Warning: Value is not properly chunk encoded in /home/content/97/11613597/html/includes/modules/shipping/usps.php on line 649 Warning: Cannot modify header information - headers already sent by (output started at /home/content/97/11613597/html/includes/modules/shipping/usps.php:649) in /home/content/97/11613597/html/includes/functions/general.php on line 49 Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 17, 2013 Share Posted November 17, 2013 First, when debugging set the error reporting in application_top.php to error_reporting( E_ALL ); Second, go into your usps.php module and comment out the error message as posted here. Once you have that all done, try it again and see what errors you get. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
geremyh Posted November 17, 2013 Share Posted November 17, 2013 (edited) Fatal error: Class 'httpClient' not found in /home/content/97/11613597/html/includes/modules/shipping/usps.php on line 362 **edit: looks like this fixed it http://www.oscommerce.com/forums/topic/331752-receiving-fatal-error-pp-express-only-debit-ccs-work-ok/ just changed ups.com to production.shippingapis.com Edited November 17, 2013 by geremyh Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 17, 2013 Share Posted November 17, 2013 That will do it. I'm glad you found the problem. Don't forget to turn off error reporting for your live store. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
npiazza77 Posted November 18, 2013 Share Posted November 18, 2013 First off, I would like to say I have used this resource for a while. It is such a great resource and community. This is my first post on the forum but I plan to be much more active in helping others as well. I implemented this USPS Rate V4 module and I have it working well except it is not getting the correct prices on the larger packages. Can anyone point me in the correct direction where I could troubleshoot this for myself? For example, there is a product shipping within the lower 48 United States, is 8 pounds and has a dimension of 18" x 19" x 24". USPS is spitting back a cost of $18.75 US while UPS is much more accurate on the actual shipping cost of $29 US. I have a couple other larger packages that USPS is not getting the shipping amount correct. I do have the 'Larger packages - percentage increase' set to 60% but that doesn't seem to help. Thoughts or things I could try? I have latest version implemented too. Thanks in advance. Nick Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 18, 2013 Share Posted November 18, 2013 60% is way too high. Tare should normally be less than 10% unless you are shipping very light items. You should take a look at your product weights. Also check your settings in this module: setting Online rates when you are shipping retail counter can make a big difference. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
riskmaker Posted November 19, 2013 Share Posted November 19, 2013 I am getting this error perhaps you can help me Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : String not closed expecting " or ' in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: <?xml version="1.0",encoding="UTF-8"?> in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Blank needed here in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: <?xml version="1.0",encoding="UTF-8"?> in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : parsing XML declaration: '?>' expected in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: <?xml version="1.0",encoding="UTF-8"?> in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in /home/p/public_html/includes/modules/shipping/usps.php on line 397 Quote Link to comment Share on other sites More sharing options...
Erock Posted November 19, 2013 Share Posted November 19, 2013 (edited) So, I implemented the fix file from a couple pages back. Everything seems to be working fine again, with one exception, I no longer have an option for domestic first class. Is there something I missed? I tried to un-comment the line to get an email from USPS, but I get nothing in response when filling out the proper email address. Any tips anybody can give? Edited November 19, 2013 by Erock Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 19, 2013 Share Posted November 19, 2013 @@riskmaker You're not using the latest version. Get it here. @@Erock It sounds like you missed part of the change. Try the version in the above link. Also, the email works if you give it a valid email address, or use the store owner default address. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Erock Posted November 19, 2013 Share Posted November 19, 2013 (edited) I was trying to give it an email address direct in the commented line so it would go to me rather than the store owner, but am not getting anything. The link above goes to the upsxml file from Jan 2012, is that what you were referring to? I installed the update to USPS Rate that was released Nov 14th. EDIT: I got the email working, was forgetting quotes :( Edited November 19, 2013 by Erock Quote Link to comment Share on other sites More sharing options...
Erock Posted November 19, 2013 Share Posted November 19, 2013 So here is my output. I'm at a loss. I have First Class selected in admin, it seems to be passing to and from the server, but it doesn't show as an option on the site. For domestic only three options are used First Class, Media and Priority. with FC being the most used. I'm only showing Media and Priority in store. I'm stuck, usually I can get my way out, but this is stumping me. Request: API=RateV4&XML=<RateV4Request USERID="xxxxxxxxxx"><Revision>2</Revision><Package ID="0"><Service>First Class</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>53219</ZipOrigination><ZipDestination>53207</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="1"><Service>MEDIA</Service><ZipOrigination>53219</ZipOrigination><ZipDestination>53207</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="2"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>53219</ZipOrigination><ZipDestination>53207</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV4Request> Response: <?xml version="1.0" encoding="UTF-8"?> <RateV4Response><Package ID="0"><ZipOrigination>53219</ZipOrigination><ZipDestination>53207</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><FirstClassMailType>PARCEL</FirstClassMailType><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="0"><MailService>First-Class Mail</MailService><Rate>2.92</Rate><SpecialServices><SpecialService><ServiceID>9</ServiceID><ServiceName>Certificate of Mailing</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.20</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>5</ServiceID><ServiceName>Registered MailTM</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>11.20</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.20</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>0</ServiceID><ServiceName>Certified MailRM</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>3.10</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>13</ServiceID><ServiceName>USPS TrackingTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.90</Price><PriceOnline>0.00</PriceOnline></SpecialService><SpecialService><ServiceID>15</ServiceID><ServiceName>Signature ConfirmationTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.70</Price><PriceOnline>2.20</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.45</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService></SpecialServices></Postage></Package><Package ID="1"><ZipOrigination>53219</ZipOrigination><ZipDestination>53207</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="6"><MailService>Media MailRM</MailService><Rate>2.53</Rate><SpecialServices><SpecialService><ServiceID>9</ServiceID><ServiceName>Certificate of Mailing</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.20</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>13</ServiceID><ServiceName>USPS TrackingTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.90</Price><PriceOnline>0.20</PriceOnline></SpecialService><SpecialService><ServiceID>7</ServiceID><ServiceName>Return Receipt for Merchandise</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>4.10</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>15</ServiceID><ServiceName>Signature ConfirmationTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.70</Price><PriceOnline>2.20</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.45</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService></SpecialServices></Postage></Package><Package ID="2"><ZipOrigination>53219</ZipOrigination><ZipDestination>53207</ZipDestination><Pounds>0</Pounds><Ounces>8</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Zone>1</Zone><Postage CLASSID="1"><MailService>Priority Mail 1-DayTM</MailService><Rate>5.60</Rate><CommercialRate>5.05</CommercialRate><SpecialServices><SpecialService><ServiceID>9</ServiceID><ServiceName>Certificate of Mailing</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.20</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>1.95</Price><PriceOnline>1.95</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>5</ServiceID><ServiceName>Registered MailTM</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>11.20</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.20</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>0</ServiceID><ServiceName>Certified MailRM</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>3.10</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>13</ServiceID><ServiceName>USPS TrackingTM</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.10</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>15</ServiceID><ServiceName>Signature ConfirmationTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.70</Price><PriceOnline>2.20</PriceOnline></SpecialService><SpecialService><ServiceID>19</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>4.95</PriceOnline></SpecialService><SpecialService><ServiceID>20</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.15</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.45</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService></SpecialServices></Postage></Package></RateV4Response> Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 19, 2013 Share Posted November 19, 2013 You're getting a rate returned for First Class Parcel. You should be seeing that on the catalog side if you have 1st-Class Parcel selected. Remove any weight restrictions if you have them set. Otherwise I can't see anything wrong. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted November 19, 2013 Share Posted November 19, 2013 Sorry, I pulled the wrong link. It's this one. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Erock Posted November 19, 2013 Share Posted November 19, 2013 (edited) I give up I guess. Why do they have to "fix" what isn't broken? This was working fine before the USPS changes, using the default weights of 0 and 70 in every column and with the handling charges to cover extra options that are included in every shipment like tracking. But I tried it without any weights, tried changing it to a max of .8125 the max weight of FC, tried removing the handling charges, everything I can think of. I don't even have an option for First Class Parcel in the admin, only "1st-Class" http://www.ericksaint.com/images/misc/shipping.jpg http://www.ericksaint.com/images/misc/shipping2.jpg Tried using the image link and it broke the links, guess they need to be copied and pasted. Shrugs. Edited November 19, 2013 by Erock Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 19, 2013 Share Posted November 19, 2013 That's not the latest version. Make sure you have the latest, then remove and reinstall the module. And don't set the Max limit for First Class to less than 1 or it will fail. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
npiazza77 Posted November 19, 2013 Share Posted November 19, 2013 60% is way too high. Tare should normally be less than 10% unless you are shipping very light items. You should take a look at your product weights. Also check your settings in this module: setting Online rates when you are shipping retail counter can make a big difference. Regards Jim Jim, Thanks for the prompt response. I have checked all that in the module. We also use the UPS XML rates module and it is correctly getting the proper amount for the shipping cost of that item. I did add more weight and it made the UPS rate increase to too high of a level. It's almost like the USPS priority is not seeing it as an over sized item. Nick Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.