From 730453990c0dd9d0bcdab5d1e633d49c715c6470 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 10 Nov 2025 09:00:44 +0700 Subject: cr renca PPN, image, and button --- src/lib/product/components/ProductCard.jsx | 161 +++++++++++++++++++++++------ 1 file changed, 131 insertions(+), 30 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 7c1810e3..6f2ffd67 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -249,14 +249,31 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {product?.lowestPrice.priceDiscount > 0 && ( -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + + {currencyFormat( + Math.round( + Number(product.lowestPrice.priceDiscount) * + process.env.NEXT_PUBLIC_PPN + ) + )} + + + {/* {currencyFormat( Math.round( Number(product.lowestPrice.priceDiscount) * process.env.NEXT_PUBLIC_PPN ) - )} + )} */}
)}
@@ -292,13 +309,30 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {/* PPN pakai harga finalAfterVoucher */} -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + + {currencyFormat( + Math.round( + finalAfterVoucher * + process.env.NEXT_PUBLIC_PPN + ) + )} + + + {/* {currencyFormat( Math.round( finalAfterVoucher * process.env.NEXT_PUBLIC_PPN ) - )} + )} */}
); @@ -308,14 +342,31 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { return (
{currencyFormat(basePrice)} -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + + {currencyFormat( + Math.round( + Number(product.lowestPrice.price) * + process.env.NEXT_PUBLIC_PPN + ) + )} + + + {/* {currencyFormat( Math.round( Number(product.lowestPrice.price) * process.env.NEXT_PUBLIC_PPN ) - )} + )} */}
); @@ -510,14 +561,30 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
{product?.lowestPrice.priceDiscount > 0 && ( -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + + {currencyFormat( + Math.round( + Number(product.lowestPrice.priceDiscount) * + process.env.NEXT_PUBLIC_PPN + ) + )} + + {/* {currencyFormat( Math.round( Number(product.lowestPrice.priceDiscount) * process.env.NEXT_PUBLIC_PPN ) - )} + )} */}
)}
@@ -551,11 +618,22 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { {/* PPN pakai harga finalAfterVoucher */} -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + + {currencyFormat( + finalAfterVoucher * process.env.NEXT_PUBLIC_PPN + )} + + + {/* {currencyFormat( finalAfterVoucher * process.env.NEXT_PUBLIC_PPN - )} + )} */}
); @@ -565,12 +643,24 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { return (
{currencyFormat(basePrice)} -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + + {currencyFormat( + product.lowestPrice.price * + process.env.NEXT_PUBLIC_PPN + )} + + {/* {currencyFormat( product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN - )} + )} */}
); @@ -775,11 +865,21 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
{/* PPN pakai harga finalAfterVoucher */} -
- Include PPN:{' '} - {currencyFormat( +
+ Include PPN:  + {/* {currencyFormat( finalAfterVoucher * process.env.NEXT_PUBLIC_PPN - )} + )} */} + + {currencyFormat( + finalAfterVoucher * process.env.NEXT_PUBLIC_PPN + )} +
); @@ -789,8 +889,9 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { return (
{currencyFormat(basePrice)} -
- Include PPN:{' '} +
+ Include PPN:  + {currencyFormat( product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN )} -- cgit v1.2.3