saleor: fix the prices in the cart

This commit is contained in:
Zaiste 2021-04-29 21:15:01 +02:00
parent 7524f5ab2e
commit a8678bdecd
No known key found for this signature in database
GPG Key ID: 15DF7EBC7F2FFE35
2 changed files with 15 additions and 2 deletions

View File

@ -119,8 +119,8 @@ export function normalizeCart(checkout: Checkout): Cart {
}, },
taxesIncluded: false, taxesIncluded: false,
lineItems, lineItems,
lineItemsSubtotalPrice: 0, lineItemsSubtotalPrice: checkout.subtotalPrice?.gross?.amount!,
subtotalPrice: 0, subtotalPrice: checkout.subtotalPrice?.gross?.amount!,
totalPrice: checkout.totalPrice?.gross.amount!, totalPrice: checkout.totalPrice?.gross.amount!,
discounts: [], discounts: [],
} }

View File

@ -3,6 +3,19 @@ export const checkoutDetailsFragment = `
token token
created created
totalPrice {
currency
gross {
amount
}
}
subtotalPrice {
currency
gross {
amount
}
}
lines { lines {
id id
variant { variant {