From 502beab0dd86d8ba73177ca57d533021eba3567a Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 5 Jun 2020 16:23:09 +0530 Subject: [PATCH] Issue #3171 fixed --- packages/Webkul/Product/src/Type/AbstractType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Product/src/Type/AbstractType.php b/packages/Webkul/Product/src/Type/AbstractType.php index 6707df257..df3e84172 100644 --- a/packages/Webkul/Product/src/Type/AbstractType.php +++ b/packages/Webkul/Product/src/Type/AbstractType.php @@ -605,8 +605,8 @@ abstract class AbstractType } if ($price->value < $lastPrice) { - if ($price->value_type == 'percentage') { - $lastPrice = $product->price * ($price->value / 100); + if ($price->value_type == 'discount') { + $lastPrice = $product->price - ($product->price * $price->value) / 100; } else { $lastPrice = $price->value; }