Fix a bug with shipping costs as a percentage of weight. Build
a test to test the fix.
This commit is contained in:
parent
334ce4791f
commit
c0b9bdcc43
3 changed files with 65 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ sub calculate {
|
|||
my $sku = $item->getSku;
|
||||
if ($sku->isShippingRequired) {
|
||||
$cost += ($item->get("quantity") * $sku->getPrice * $self->get("percentageOfPrice") / 100) # cost by price
|
||||
+ ($item->get("quantity") * $sku->getWeight * $self->get("percentageOfWeight") / 100) # cost by weight
|
||||
+ ($item->get("quantity") * $sku->getWeight * $self->get("pricePerWeight") / 100) # cost by weight
|
||||
+ ($item->get("quantity") * $self->get("pricePerItem")); # cost by item
|
||||
$anyShippable = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue