Guest tuffdude Posted April 26, 2008 Share Posted April 26, 2008 I worked on this for a couple hours before I got everything working. But these 3 steps fixed the modules I wanted to use Parcel, Priority, and First Class !!!! Thanks so much to Al, Alan T, and donniedj !!!!! Step 1 : (I don't know if this step was necessary, but I did it and everything's great) Thanks to Al Backup, then install the zip in this post; Al's USPS v4_zip Step 2 : (This fixes the Priority to allow the variable shipping by weight) Thanks go to Alan T In /modules/shipping/USPS/class.usps.php, around line 351, change $this->request_xml .= '<Container>' . strtoupper($attribs['container']) . '</Container>'; to if(strtoupper($attribs['container']) == 'FLAT RATE BOX' || strtoupper($attribs['container']) == 'FLAT RATE ENVELOPE'){ $this->request_xml .= '<Container>' . strtoupper($attribs['container']) . '</Container>'; } Now we can set either Flat Rate OR Variable Rate and get real-time quotes. Too bad we can't get both at the same time. Step 3 : (This fixes the USPS First Class Bug) Thanks go to donniedj $module['FirstClassSize'] should be $module['serviceFirstClass'] In /modules/shipping/USPS/calc.php, around line 102, change $package = array( 'service' => 'FIRST CLASS', 'size' => $module['FirstClassSize'], 'mail_type' => "Package", 'first_class_mail_type' => $module['FirstClassMailType'], 'machinable' => $module['FirstClassMachineable'] ); to $package = array( 'service' => 'FIRST CLASS', 'size' => $module['serviceFirstClass'], 'mail_type' => "Package", 'first_class_mail_type' => $module['FirstClassMailType'], 'machinable' => $module['FirstClassMachineable'] ); This really should be STICKIED, it would save some people like me alot of time, and confusion !!!! :) Quote Link to comment Share on other sites More sharing options...
Guest Klutzys Posted May 14, 2008 Share Posted May 14, 2008 Hi, I just wanted to clarify that this works with CCV3 as this article tells us to install the Al's USPS v4_zip. Thanks, Tammy I worked on this for a couple hours before I got everything working. But these 3 steps fixed the modules I wanted to use Parcel, Priority, and First Class !!!! Thanks so much to Al, Alan T, and donniedj !!!!! Step 1 : (I don't know if this step was necessary, but I did it and everything's great) Thanks to Al Backup, then install the zip in this post; Al's USPS v4_zip Step 2 : (This fixes the Priority to allow the variable shipping by weight) Thanks go to Alan T In /modules/shipping/USPS/class.usps.php, around line 351, change $this->request_xml .= '<Container>' . strtoupper($attribs['container']) . '</Container>'; to if(strtoupper($attribs['container']) == 'FLAT RATE BOX' || strtoupper($attribs['container']) == 'FLAT RATE ENVELOPE'){ $this->request_xml .= '<Container>' . strtoupper($attribs['container']) . '</Container>'; } Now we can set either Flat Rate OR Variable Rate and get real-time quotes. Too bad we can't get both at the same time. Step 3 : (This fixes the USPS First Class Bug) Thanks go to donniedj $module['FirstClassSize'] should be $module['serviceFirstClass'] In /modules/shipping/USPS/calc.php, around line 102, change $package = array( 'service' => 'FIRST CLASS', 'size' => $module['FirstClassSize'], 'mail_type' => "Package", 'first_class_mail_type' => $module['FirstClassMailType'], 'machinable' => $module['FirstClassMachineable'] ); to $package = array( 'service' => 'FIRST CLASS', 'size' => $module['serviceFirstClass'], 'mail_type' => "Package", 'first_class_mail_type' => $module['FirstClassMailType'], 'machinable' => $module['FirstClassMachineable'] ); This really should be STICKIED, it would save some people like me alot of time, and confusion !!!! Quote Link to comment Share on other sites More sharing options...
Guest cardhost Posted June 24, 2008 Share Posted June 24, 2008 Works great, but I just found something that needs to be fixed. When you have both USPS Priority Mail and USPS Express Mail enabled... At checkout, you do not have the option to choose from one or the other. The cart only gives you the USPS Express Mail price. What if you do not want to pay for USPS Express Mail and want the USPS Priority Mail option????? Quote Link to comment Share on other sites More sharing options...
Guest Klutzys Posted July 1, 2008 Share Posted July 1, 2008 After making these changes and going through checkout this is the error message I get: Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home1/midwesv9/public_html/modules/shipping/USPS/class.usps.php on line 575 Here is what my line 575 says: ?> I didn't change anything at the bottom....any ideas?? Tammy Quote Link to comment Share on other sites More sharing options...
Guest cardhost Posted July 1, 2008 Share Posted July 1, 2008 After making these changes and going through checkout this is the error message I get: Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home1/midwesv9/public_html/modules/shipping/USPS/class.usps.php on line 575 Here is what my line 575 says: ?> I didn't change anything at the bottom....any ideas?? Tammy Check your modifications. That is telling you that there is an extra ; somewhere. Scott Quote Link to comment Share on other sites More sharing options...
Guest djpezo Posted July 21, 2008 Share Posted July 21, 2008 I tried this fix as well and now USPS first class is not working for me. I calculate shipping based on weight and all of my products are less than 1 lb so my weights are 0.32, etc. (I converted the oz. to lbs.). The error I am getting is "USPS Error: Size not recognized". Can anyone help me, please? Thank you, Diane Quote Link to comment Share on other sites More sharing options...
Guest cardhost Posted July 21, 2008 Share Posted July 21, 2008 I tried this fix as well and now USPS first class is not working for me. I calculate shipping based on weight and all of my products are less than 1 lb so my weights are 0.32, etc. (I converted the oz. to lbs.). The error I am getting is "USPS Error: Size not recognized". Can anyone help me, please? Thank you, Diane You have to round it up to the next nearest pound. Quote Link to comment Share on other sites More sharing options...
Guest Champs Posted August 21, 2008 Share Posted August 21, 2008 Could you be more specific about what "it" is? I see only whole numbers when I dump the contents of $module under the FirstClass case. EDIT: The admin interface says that 13oz. is the package size limit anyway, so that should be (kind of) a problem if you pass a weight of 1lb... but however appropriate that size is, and I don't think it is, that kind of exception should only disable the First Class option instead of stopping the show. Quote Link to comment Share on other sites More sharing options...
34Ford Posted October 6, 2009 Share Posted October 6, 2009 Well after a year and trying the latest CC version I still cannot figure out how to enter the weight into my products that only weigh 2.50 ounces to get first class to not say "Failed to add the package". Quote Link to comment Share on other sites More sharing options...
Guest ElliottDennis Posted October 19, 2010 Share Posted October 19, 2010 I tried this fix as well and now USPS first class is not working for me. I calculate shipping based on weight and all of my products are less than 1 lb so my weights are 0.32, etc. (I converted the oz. to lbs.). The error I am getting is "USPS Error: Size not recognized". Can anyone help me, please? Thank you, Diane __________________________________________________ Nissan shocks andstruts Toyota quick strut Toyota shocks and struts 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.