[통합로그]SearchItemcard 할인률 적용

This commit is contained in:
opacity@t-win.kr
2025-12-05 16:16:39 +09:00
parent 7a9a778b71
commit 3dd8b341e7

View File

@@ -80,11 +80,20 @@ export default memo(function SearchItemCard({
const xContainer = tItemCard?.parentNode?.parentNode;
const yContainer = tBody?.children[0]?.children[0]?.children[0];
// 할인율 계산
const discountRate =
priceNumber > discountPriceNumber
? Math.round(
((priceNumber - discountPriceNumber) / priceNumber) * 100
) + "%"
: "";
sendLog({
productId: prdtId,
productTitle: title,
partner: patncNm,
price: dcPrice ? dcPrice : price,
price: price,
discount: discountRate,
resultType: "item",
});
if (xContainer && yContainer) {