diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-08-09 03:56:04 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-08-09 03:56:04 +0000 |
| commit | ea7e2cf8f768c3d3202c282182de6355b3ee32ee (patch) | |
| tree | 3153024ccaa24192b3adf94c44f179cc9b344f8e /src-migrate/services | |
| parent | c9090a89b775a1e3c2f1e707021e6375eb9f92e3 (diff) | |
| parent | bbbd7ccaab3102558dc82cbd051947b0e579360c (diff) | |
Merged in Feature/template-switch (pull request #228)
Feature/template switch
Diffstat (limited to 'src-migrate/services')
| -rw-r--r-- | src-migrate/services/product.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src-migrate/services/product.ts b/src-migrate/services/product.ts index ec5435cd..2152ba26 100644 --- a/src-migrate/services/product.ts +++ b/src-migrate/services/product.ts @@ -57,21 +57,24 @@ export const getProductSimilar = async ({ dataflashSale = dataFlash.response.products.map((product: { qtySold: any; stockTotal: any; - flashSale: any; lowestPrice: any; -}) => ({ + flashSale: any; + lowestPrice: any; + }) => ({ ...product, - lowest_price: product.lowestPrice, + lowest_price: { + discount_percentage: product.lowestPrice.discountPercentage, + price: product.lowestPrice.price, + price_discount: product.lowestPrice.priceDiscount, + }, flash_sale: product.flashSale, stock_total: product.stockTotal, qty_sold: product.qtySold, - lowestPrice: undefined })); if (source === 'bottom') { dataflashSale = dataflashSale.slice('2', '4') } else { dataflashSale = dataflashSale } - console.log("dataflashSale",dataflashSale) } const query = [ `q=${name}`, |
