diff options
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}`, |
