Description
Many of the products of the Commerce site we are building have very small weights. For example, one product I am looking at has a weight of 0.001 lbs. When I add that item to my cart and the boxes get packed to fetch the shipping rates, we are getting this error FedEx: Weight is missing or invalid.
I dove into the plugin a bit and tried to do some dumping to see what was going on. If I add a Craft::dd($packedBox); inside this foreach:
So it appears like there is a weight value on the item. But if I do Craft::dd($weight); after the $weight variable is set, the value is 0. If I change the weight of the product to 0.5 lbs, then I correctly get shipping rates. Is there a specific minimum weight that Fedex expects? Let me know if there's any other info I can provide or if you want me to test other values. Thanks in advance!
Steps to reproduce
Add a small weight to a variant 0.001
Add that variant to your cart and checkout
See that no shipping options are available because the weight is 0
Description Many of the products of the Commerce site we are building have very small weights. For example, one product I am looking at has a weight of
0.001
lbs. When I add that item to my cart and the boxes get packed to fetch the shipping rates, we are getting this errorFedEx: Weight is missing or invalid
.I dove into the plugin a bit and tried to do some dumping to see what was going on. If I add a
Craft::dd($packedBox);
inside this foreach:https://github.com/verbb/postie/blob/021efbb87ed18e9b04af74c3f69dd15e4d69dc9f/src/models/PackedBoxes.php#L40-L70
I get this output:
So it appears like there is a weight value on the item. But if I do
Craft::dd($weight);
after the$weight
variable is set, the value is 0. If I change the weight of the product to0.5
lbs, then I correctly get shipping rates. Is there a specific minimum weight that Fedex expects? Let me know if there's any other info I can provide or if you want me to test other values. Thanks in advance!Steps to reproduce
0.001
Additional info