Skip to content

Commit e7b05df

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-2515: Cart Price Rule stops working properly after adding Bundle Product to the cart with Dynamic Price attribute disabled
1 parent 6f5a25e commit e7b05df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function collectRates(RateRequest $request)
132132
if ($item->getHasChildren() && $item->isShipSeparately()) {
133133
foreach ($item->getChildren() as $child) {
134134
if ($child->getFreeShipping() && !$child->getProduct()->isVirtual()) {
135-
$freeShipping = is_numeric($child->getFreeShipping()) ? $child->getFreeShipping() : 0;
135+
$freeShipping = is_numeric((int)$child->getFreeShipping()) ? (int)$child->getFreeShipping() : 0;
136136
$freeQty += $item->getQty() * ($child->getQty() - $freeShipping);
137137
}
138138
}
@@ -142,7 +142,7 @@ public function collectRates(RateRequest $request)
142142
) {
143143
$freeShipping = $item->getFreeShipping() ?
144144
$item->getFreeShipping() : $item->getAddress()->getFreeShipping();
145-
$freeShipping = is_numeric($freeShipping) ? $freeShipping : 0;
145+
$freeShipping = is_numeric((int)$freeShipping) ? (int)$freeShipping : 0;
146146
$freeQty += $item->getQty() - $freeShipping;
147147
$freePackageValue += $item->getBaseRowTotal();
148148
}

0 commit comments

Comments
 (0)