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,
lineItems,
lineItemsSubtotalPrice: 0,
subtotalPrice: 0,
lineItemsSubtotalPrice: checkout.subtotalPrice?.gross?.amount!,
subtotalPrice: checkout.subtotalPrice?.gross?.amount!,
totalPrice: checkout.totalPrice?.gross.amount!,
discounts: [],
}

View File

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