Merged in fix/SW-1997-tracking-ancillaries-adjust-total (pull request #1893)

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
This commit is contained in:
Bianca Widstam
2025-04-29 09:01:02 +00:00
parent dcd2dba950
commit 972d530be8

View File

@@ -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,
})
}