summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-06-21 11:01:35 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-06-21 11:01:35 +0700
commit220190db66bcc1c6db78180c593f21e9cf8f363c (patch)
tree1517faa9636a6b3b2cc8d468a57b1fe476c229d7 /src/utils
parent208b234320b6c42491a4e87a1c3db3abab9c1715 (diff)
parent1cf754b4d8da1aa28700ffc3dad67081f6daf9a5 (diff)
Merge branch 'promotion-program' into feature/all-promotion
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/solrMapping.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils/solrMapping.js b/src/utils/solrMapping.js
index 7e887253..dd90ac7d 100644
--- a/src/utils/solrMapping.js
+++ b/src/utils/solrMapping.js
@@ -36,6 +36,8 @@ export const productMappingSolr = (products, pricelist) => {
tag: product?.flashsale_tag_s || 'FLASH SALE',
},
qtySold: product?.qty_sold_f || 0,
+ isTkdn:product?.tkdn_b || false,
+ isSni:product?.sni_b || false,
};
if (product.manufacture_id_i && product.manufacture_name_s) {
@@ -98,9 +100,10 @@ export const variantsMappingSolr = (parent, products, pricelist) => {
};
}
productMapped.parent = {
- id: parent.product_id_i || '',
- image: parent.image_s || '',
- name: parent.name_s || '',
+ id: parent[0]?.product_id_i || '',
+ image: parent[0]?.image_s || '',
+ name: parent[0]?.name_s || '',
+ description: parent[0]?.description_t || '',
};
return productMapped;
});