Quinton Posted January 5, 2005 Share Posted January 5, 2005 This may be and odd question but I have been unable to find a definitive answer in the Knowledgebase or the forum. USPS requires that weight be entered in Lb and Oz. What format do I need to enter on the product details screen to get the correct weight. For example if I have a 1 Lb 3 Oz item do I enter it 1.1875 Lb or woudld it be 19 Oz. or would it be some other value like 1,3? I have been having problems with the USPS module and the cause seems to be the weight format that is being sent so I want to verify how to enter the weight. Thanks, Quinton Quote Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2005 Share Posted January 7, 2005 This may be and odd question but I have been unable to find a definitive answer in the Knowledgebase or the forum. USPS requires that weight be entered in Lb and Oz. What format do I need to enter on the product details screen to get the correct weight. For example if I have a 1 Lb 3 Oz item do I enter it 1.1875 Lb or woudld it be 19 Oz. or would it be some other value like 1,3? I have been having problems with the USPS module and the cause seems to be the weight format that is being sent so I want to verify how to enter the weight. Thanks, Quinton <{POST_SNAPBACK}> I am using the format "0.25" and it's working for me, including getting the correct postage back on an order such as "1.25". From what I can tell, this format is in Lbs (ie, 1 and 1/4 pounds). This matches up with entering 1 pound 4 ounces on the webtools site. Hope that helps :) Quote Link to comment Share on other sites More sharing options...
Quinton Posted January 7, 2005 Author Share Posted January 7, 2005 I am using the format "0.25" and it's working for me, including getting the correct postage back on an order such as "1.25". From what I can tell, this format is in Lbs (ie, 1 and 1/4 pounds). This matches up with entering 1 pound 4 ounces on the webtools site. Hope that helps :) <{POST_SNAPBACK}> Thank you!! Quote Link to comment Share on other sites More sharing options...
darkvader Posted January 13, 2005 Share Posted January 13, 2005 Thank you!! <{POST_SNAPBACK}> Hi, I notice that when you have two products on your shopping cart that each one weight for example 0.10 instead of the contribution to add them up to 1.04 it add them up to 0.20 wich cause the contribution to show First Class to the costumer as an option for shipping. Which obviously is wrong because everything 1.00 up should only be ship via Priority Mail. Does anyone knows a solution to this problem? I hope my explanation of the problem is clear enought Thanks in advance :thumbsup: Quote Link to comment Share on other sites More sharing options...
Quinton Posted January 14, 2005 Author Share Posted January 14, 2005 Hi, I notice that when you have two products on your shopping cart that each one weight for example 0.10 instead of the contribution to add them up to 1.04 it add them up to 0.20 wich cause the contribution to show First Class to the costumer as an option for shipping. Which obviously is wrong because everything 1.00 up should only be ship via Priority Mail. Does anyone knows a solution to this problem? I hope my explanation of the problem is clear enought Thanks in advance :thumbsup: <{POST_SNAPBACK}> Darkvader I may have a solution for you. We were running into problems with the USPS module rounding some shipping wieghts down and others were fine. after looking at the pattern and the code from catalog/includes/modules/shipping/usps.php I found the problem. I have found a way to eliminate the round down problem when products add up to any fraction of an oz. less than .5 the code in the USPS shipping module reads as follows // usps doesnt accept zero weight $shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight); $shipping_pounds = floor ($shipping_weight); $shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight))); $this->_setWeight($shipping_pounds, $shipping_ounces); I changed mine to the following // usps doesnt accept zero weight $shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight); $shipping_pounds = floor ($shipping_weight); $shipping_ounces = ceil(16 * ($shipping_weight - floor($shipping_weight))); $this->_setWeight($shipping_pounds, $shipping_ounces); The problem and fix are both in red. The round function under PHP does classic rounding (rounding anything from 1 to 4 down and anything from 5 to 9 up) while the ceil funcion takes any fraction to the next highest whole number (2.45 becomes 3) sort of the opposite of floor. Since the USPS rounds up any fraction of an ounce to the next highest ounce the appropriate solution would be to round up also. Hope this helps... Good Luck, Quinton Quote Link to comment Share on other sites More sharing options...
mugitty Posted January 14, 2005 Share Posted January 14, 2005 Just to clarify... While USPS requires pounds and ounces, your entries in the stock osC should be made in whole units (pounds) and the decimal equivalent for parts of a whole unit - not ounces. The USPS module takes care of converting the information into pounds and ounces For example, in the reference above: I notice that when you have two products on your shopping cart that each one weight for example 0.10 instead of the contribution to add them up to 1.04 it add them up to 0.20 wich cause the contribution to show First Class to the costumer as an option for shipping. Which obviously is wrong because everything 1.00 up should only be ship via Priority Mail.I assume that the products mentioned are supposed to be 10 ounces each? They should be entered as 0.625 when entering their weight into the new product page. If entered as 0.10, the total for two properly appears as 0.20 which the USPS module will translate into 3.2 ounces (4 ounces rounded) which is obviously still under 1 pound and still a valid First Class weight. Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
darkvader Posted January 14, 2005 Share Posted January 14, 2005 Just to clarify... While USPS requires pounds and ounces, your entries in the stock osC should be made in whole units (pounds) and the decimal equivalent for parts of a whole unit - not ounces. The USPS module takes care of converting the information into pounds and ounces For example, in the reference above:I assume that the products mentioned are supposed to be 10 ounces each? They should be entered as 0.625 when entering their weight into the new product page. If entered as 0.10, the total for two properly appears as 0.20 which the USPS module will translate into 3.2 ounces (4 ounces rounded) which is obviously still under 1 pound and still a valid First Class weight. <{POST_SNAPBACK}> Mugitty and Quinton, Thanks a lot for the replies !! Quinton by using your fix do I still need to enter the ounces the way Quinton mention (0.10 had to be enter as 0.625 ) or I will be able to use 0.10 ? I had been using the 0.10 format on all my products :-( so changing them to the 0.625 format will be a major task :-( Thanks in advance :thumbsup: Quote Link to comment Share on other sites More sharing options...
darkvader Posted January 19, 2005 Share Posted January 19, 2005 Thanks for the reply. I have another question yo umaybe able to answer, I just notice that when I add more than 9 items to my shopping cart, when it goes to the shipping part the USP give the following error: An error occured with the USPS shipping calculations. If you prefer to use USPS as your shipping method, please contact the store owner. Any ideas? Thanks :thumbsup: Darkvader I may have a solution for you. We were running into problems with the USPS module rounding some shipping wieghts down and others were fine. after looking at the pattern and the code from catalog/includes/modules/shipping/usps.php I found the problem. I have found a way to eliminate the round down problem when products add up to any fraction of an oz. less than .5 the code in the USPS shipping module reads as follows // usps doesnt accept zero weight $shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight); $shipping_pounds = floor ($shipping_weight); $shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight))); $this->_setWeight($shipping_pounds, $shipping_ounces); I changed mine to the following // usps doesnt accept zero weight $shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight); $shipping_pounds = floor ($shipping_weight); $shipping_ounces = ceil(16 * ($shipping_weight - floor($shipping_weight))); $this->_setWeight($shipping_pounds, $shipping_ounces); The problem and fix are both in red. The round function under PHP does classic rounding (rounding anything from 1 to 4 down and anything from 5 to 9 up) while the ceil funcion takes any fraction to the next highest whole number (2.45 becomes 3) sort of the opposite of floor. Since the USPS rounds up any fraction of an ounce to the next highest ounce the appropriate solution would be to round up also. Hope this helps... Good Luck, Quinton <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
Quinton Posted January 19, 2005 Author Share Posted January 19, 2005 Mugitty and Quinton, Thanks a lot for the replies !! Quinton by using your fix do I still need to enter the ounces the way Quinton mention (0.10 had to be enter as 0.625 ) or I will be able to use 0.10 ? I had been using the 0.10 format on all my products :-( so changing them to the 0.625 format will be a major task :-( Thanks in advance :thumbsup: <{POST_SNAPBACK}> You need to have your USPS module configured for the production servers... I did this by entering my account information on the admin console window, then I contacted the usps support line and they moved my server to production and my problem was solved.... not sure why you are having problems after nine objects... hope this helps.. Quinton Quote Link to comment Share on other sites More sharing options...
darkvader Posted January 19, 2005 Share Posted January 19, 2005 I had being on the production servcer for a long time already. This problem only happen after 9 items for some reason. Thanks for the reply You need to have your USPS module configured for the production servers... I did this by entering my account information on the admin console window, then I contacted the usps support line and they moved my server to production and my problem was solved.... not sure why you are having problems after nine objects... hope this helps.. Quinton <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
darkvader Posted January 19, 2005 Share Posted January 19, 2005 Doing more testing I just realize that the problem is not the amount of items, but the weight. If the product weights more than 9.00 pounds it give me the error An error occured with the USPS shipping calculations. If you prefer to use USPS as your shipping method, please contact the store owner. Any new ideas base on this new info? Thnaks I had being on the production servcer for a long time already. This problem only happen after 9 items for some reason. Thanks for the reply <{POST_SNAPBACK}> 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.