From 972d530be87325a6a715e4d97101228806f3d958 Mon Sep 17 00:00:00 2001 From: Bianca Widstam Date: Tue, 29 Apr 2025 09:01:02 +0000 Subject: [PATCH] Merged in fix/SW-1997-tracking-ancillaries-adjust-total (pull request #1893) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(SW-1997): productPoints and productPrice should be the total * fix(SW-1997): productPoints and productPrice should be the total Approved-by: Matilda Landström --- apps/scandic-web/utils/tracking/myStay.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/scandic-web/utils/tracking/myStay.ts b/apps/scandic-web/utils/tracking/myStay.ts index c19f56856..fec04eacf 100644 --- a/apps/scandic-web/utils/tracking/myStay.ts +++ b/apps/scandic-web/utils/tracking/myStay.ts @@ -195,7 +195,7 @@ export function trackAddAncillary( productId: ancillary?.id, productName: ancillary?.title, productUnits: quantityWithCard, - productPrice: ancillary?.price.total, + productPrice: (ancillary?.price.total ?? 0) * (quantityWithCard ?? 0), currency: ancillary?.price.currency, productCategory: ancillary?.categoryName, }) @@ -207,7 +207,7 @@ export function trackAddAncillary( productId: ancillary?.loyaltyCode, productName: ancillary?.title, productUnits: quantityWithPoints, - productPoints: ancillary?.points, + productPoints: (ancillary?.points ?? 0) * (quantityWithPoints ?? 0), productCategory: ancillary?.categoryName, }) }