diff --git a/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleProductPrice.php b/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleProductPrice.php index a870a2273..2d7413526 100644 --- a/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleProductPrice.php +++ b/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleProductPrice.php @@ -98,8 +98,8 @@ class CatalogRuleProductPrice foreach ($dates as $key => $date) { if ((! $row->starts_from || $date >= $row->starts_from) - && (! $row->ends_till || $date <= $row->ends_till)) - { + && (! $row->ends_till || $date <= $row->ends_till) + ) { $priceKey = $date->getTimestamp() . '-' . $productKey; if (isset($endRuleFlags[$priceKey])) { diff --git a/packages/Webkul/Product/src/Type/AbstractType.php b/packages/Webkul/Product/src/Type/AbstractType.php index a0dfcf813..3bc887ce2 100644 --- a/packages/Webkul/Product/src/Type/AbstractType.php +++ b/packages/Webkul/Product/src/Type/AbstractType.php @@ -495,7 +495,7 @@ abstract class AbstractType } if (! (float) $this->product->special_price) { - if ($rulePrice) { + if ($rulePrice && $rulePrice->price < $this->product->price) { $this->product->special_price = $rulePrice->price; return true;