diff --git a/packages/Webkul/Discount/src/Actions/BuyAGetB.php b/packages/Webkul/Discount/src/Actions/BuyAGetB.php index 5ba164830..21d8a5475 100644 --- a/packages/Webkul/Discount/src/Actions/BuyAGetB.php +++ b/packages/Webkul/Discount/src/Actions/BuyAGetB.php @@ -23,6 +23,8 @@ class BuyAGetB extends Action if ($realQty > $disc_quantity) { $amountDiscounted = $amountDiscounted * $disc_quantity; + } else { + $amountDiscounted = $amountDiscounted * $realQty; } if ($amountDiscounted > $item['base_price']) { diff --git a/packages/Webkul/Discount/src/Actions/FixedAmount.php b/packages/Webkul/Discount/src/Actions/FixedAmount.php index 140302dcb..a46ae6ecd 100644 --- a/packages/Webkul/Discount/src/Actions/FixedAmount.php +++ b/packages/Webkul/Discount/src/Actions/FixedAmount.php @@ -23,6 +23,8 @@ class FixedAmount extends Action if ($realQty > $disc_quantity) { $amountDiscounted = $amountDiscounted * $disc_quantity; + } else { + $amountDiscounted = $amountDiscounted * $realQty; } if ($amountDiscounted > $item['base_price']) { diff --git a/packages/Webkul/Discount/src/Actions/PercentOfProduct.php b/packages/Webkul/Discount/src/Actions/PercentOfProduct.php index fed6c73c8..542ea349d 100644 --- a/packages/Webkul/Discount/src/Actions/PercentOfProduct.php +++ b/packages/Webkul/Discount/src/Actions/PercentOfProduct.php @@ -20,6 +20,8 @@ class PercentOfProduct extends Action if ($realQty > $disc_quantity) { $amountDiscounted = $amountDiscounted * $disc_quantity; + } else { + $amountDiscounted = $amountDiscounted * $realQty; } if ($amountDiscounted > $item['base_price']) {