Catalog price rule issue fixed if discounted and normal price is same

This commit is contained in:
Jitendra Singh 2020-03-13 19:03:19 +05:30
parent 9b60f0b8ec
commit 4e10d706f5
2 changed files with 3 additions and 3 deletions

View File

@ -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])) {

View File

@ -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;