diff --git a/framework/saleor/utils/normalize.ts b/framework/saleor/utils/normalize.ts index d48ad8c2f..426b296f3 100644 --- a/framework/saleor/utils/normalize.ts +++ b/framework/saleor/utils/normalize.ts @@ -119,8 +119,8 @@ export function normalizeCart(checkout: Checkout): Cart { }, taxesIncluded: false, lineItems, - lineItemsSubtotalPrice: 0, - subtotalPrice: 0, + lineItemsSubtotalPrice: checkout.subtotalPrice?.gross?.amount!, + subtotalPrice: checkout.subtotalPrice?.gross?.amount!, totalPrice: checkout.totalPrice?.gross.amount!, discounts: [], } diff --git a/framework/saleor/utils/queries/get-checkout-query.ts b/framework/saleor/utils/queries/get-checkout-query.ts index a054e6f9f..524718bb8 100644 --- a/framework/saleor/utils/queries/get-checkout-query.ts +++ b/framework/saleor/utils/queries/get-checkout-query.ts @@ -3,6 +3,19 @@ export const checkoutDetailsFragment = ` token created + totalPrice { + currency + gross { + amount + } + } + subtotalPrice { + currency + gross { + amount + } + } + lines { id variant {