Skip to content

Commit ac91460

Browse files
author
Oleksandr Iegorov
committed
MAGETWO-69940: Free shipping coupon not working with Table Rates shipping
1 parent 67b5fe7 commit ac91460

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ public function collectRates(RateRequest $request)
128128
$freeQty += $item->getQty() * ($child->getQty() - $freeShipping);
129129
}
130130
}
131-
} elseif ($item->getFreeShipping()) {
132-
$freeShipping = is_numeric($item->getFreeShipping()) ? $item->getFreeShipping() : 0;
131+
} elseif ($item->getFreeShipping() || $item->getAddress()->getFreeShipping()) {
132+
$freeShipping = $item->getFreeShipping() ?
133+
$item->getFreeShipping() : $item->getAddress()->getFreeShipping();
134+
$freeShipping = is_numeric($freeShipping) ? $freeShipping : 0;
133135
$freeQty += $item->getQty() - $freeShipping;
134136
$freePackageValue += $item->getBaseRowTotal();
135137
}

0 commit comments

Comments
 (0)