Skip to content

Commit 3ad4667

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 37b6868 commit 3ad4667

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,17 @@ 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((int)$child->getFreeShipping()) ? (int)$child->getFreeShipping() : 0;
135+
$freeShipping = is_numeric((int)$child->getFreeShipping())
136+
? (int)$child->getFreeShipping()
137+
: 0;
136138
$freeQty += $item->getQty() * ($child->getQty() - $freeShipping);
137139
}
138140
}
139141
} elseif (($item->getFreeShipping() || $item->getAddress()->getFreeShipping()) &&
140142
($item->getFreeShippingMethod() == null || $item->getFreeShippingMethod() &&
141143
$item->getFreeShippingMethod() == 'tablerate_bestway')
142-
) {
144+
)
145+
{
143146
$freeShipping = $item->getFreeShipping() ?
144147
$item->getFreeShipping() : $item->getAddress()->getFreeShipping();
145148
$freeShipping = is_numeric($freeShipping) ? $freeShipping : 0;

0 commit comments

Comments
 (0)