diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-09 10:51:10 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-09 10:51:10 +0700 |
| commit | e33a7e612a3c2c871f6a0a84d0d04d6f6ddc357a (patch) | |
| tree | 6843753e513b1ce5c671d5bde6f819df4a18091e /src-migrate/services | |
| parent | 616d8ffc973eba673069243ec8981b5234234fe5 (diff) | |
<iman> update template switch & delete console log
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}`, |
