Skip to content

Commit 0587b50

Browse files
committed
Merge remote-tracking branch 'l3/ACP2E-2618' into Tier4-PR-Delivery-12-1-23
2 parents 6c33a45 + 7d59e29 commit 0587b50

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/code/Magento/Bundle/Pricing/Price/SpecialPrice.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getValue()
4343
}
4444

4545
$specialPrice = $this->getDiscountPercent();
46-
if ($specialPrice) {
46+
if ($specialPrice !== false) {
4747
$regularPrice = $this->getRegularPrice();
4848
$this->value = $regularPrice * ($specialPrice / 100);
4949
} else {
@@ -63,6 +63,8 @@ protected function getRegularPrice()
6363
}
6464

6565
/**
66+
* Returns true as special price is always percentage for bundle products
67+
*
6668
* @return bool
6769
*/
6870
public function isPercentageDiscount()

app/code/Magento/Bundle/Test/Unit/Pricing/Price/SpecialPriceTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ public function getValueDataProvider()
135135
'percent' => 40],
136136
['regularPrice' => 75, 'specialPrice' => 40, 'isScopeDateInInterval' => false, 'value' => false,
137137
'percent' => null],
138+
['regularPrice' => 100, 'specialPrice' => 0, 'isScopeDateInInterval' => true, 'value' => 0,
139+
'percent' => 0],
138140
];
139141
}
140142
}

0 commit comments

Comments
 (0)