From 6c7c80b9cf3f4146af1fcfc4c9b24881a7b29b3c Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 25 Sep 2024 14:39:16 +0700 Subject: add price_tier to program line --- indoteknik_custom/models/solr/product_template.py | 4 ++-- indoteknik_custom/models/solr/promotion_program_line.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models/solr') diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index d8dec47c..1eb6f31b 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -112,8 +112,8 @@ class ProductTemplate(models.Model): "description_clean_t": cleaned_desc or '', 'has_product_info_b': True, 'publish_b': not template.unpublished, - 'sni_b': template.unpublished, - 'tkdn_b': template.unpublished, + 'sni_b': template.sni, + 'tkdn_b': template.tkdn, "qty_sold_f": template.qty_sold, "is_in_bu_b": is_in_bu, "voucher_min_purchase_f" : voucher.min_purchase_amount or 0, diff --git a/indoteknik_custom/models/solr/promotion_program_line.py b/indoteknik_custom/models/solr/promotion_program_line.py index 3e3a2a28..64ad4209 100644 --- a/indoteknik_custom/models/solr/promotion_program_line.py +++ b/indoteknik_custom/models/solr/promotion_program_line.py @@ -53,6 +53,11 @@ class PromotionProgramLine(models.Model): 'package_limit_user_i': rec.package_limit_user, 'package_limit_trx_i': rec.package_limit_trx, 'price_f': rec.price, + 'price_tier_1_f': rec.price_tier_1, + 'price_tier_2_f': rec.price_tier_2, + 'price_tier_3_f': rec.price_tier_3, + 'price_tier_4_f': rec.price_tier_4, + 'price_tier_5_f': rec.price_tier_5, 'sequence_i': sequence_value, 'product_ids': [x.product_id.id for x in rec.product_ids], 'products_s': json.dumps(products), -- cgit v1.2.3