Page 1 of 1

Found a weight calculation bug in PricingProvider

Posted: Mon Sep 08, 2014 1:21 pm
by daniel_locious
Hi guys,

I was debugging on org.broadleafcommerce.core.pricing.service.fulfillment.provider.BandedFulfillmentPricingProvider, as I set my FulfillmentWeightBand weight unit as KG rather Pound, the shipping price was wrong.

In BandedFulfillmentPricingProvider.estimateCostForFulfillmentGroup, the weightTotal is converted to pounds, but the band didn't check its unit, so in Line 175

Code: Select all

 bandMinimumAmount = ((FulfillmentWeightBand) band).getMinimumWeight();

should be

Code: Select all

bandMinimumAmount = convertWeight(((FulfillmentWeightBand) band).getMinimumWeight(), ((FulfillmentWeightBand) band).getWeightUnitOfMeasure());


Cheers,

Dan

Re: Found a weight calculation bug in PricingProvider

Posted: Mon Sep 08, 2014 1:51 pm
by phillipuniverse