From 5bb681f2975a3fb38fcd87c89f72d18c6e794170 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Sat, 28 Oct 2023 10:07:00 +0700 Subject: Bug fix condition sync product price to solr --- indoteknik_custom/models/solr/product_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 2bbcab9c..648a0625 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -137,7 +137,7 @@ class ProductTemplate(models.Model): price_tier = price_doc.get(f"{price_tier_key}_f", 0) # When price tier is 0 or variant_price less than price tier then use variant price - if price_tier == 0 or variant_price < price_tier: + if price_tier == 0 or (variant_price < price_tier and variant_price > 0): price_doc[f"{discount_tier_key}_f"] = variant_discount price_doc[f"{price_tier_key}_f"] = variant_price -- cgit v1.2.3