For the complete documentation index, see llms.txt. This page is also available as Markdown.

Function: calculateCartTotals()

function calculateCartTotals(cart): FirmhouseCartTotals;

Calculate cart subtotals, promotion discounts, and totals.

Active promotions do not stack: when multiple promotions are present, the largest discount is used. Shipping is not included.

Parameters

cart

Pick<FirmhouseCart, | "amountForStartingSubscriptionCents" | "monthlyAmountCents" | "appliedPromotions">

Returns

FirmhouseCartTotals

Last updated

Was this helpful?