fix: cart bugs

This commit is contained in:
Victor Gerbrands
2023-05-09 19:16:13 +02:00
parent 834e6bdff3
commit f739c891b0
4 changed files with 8 additions and 10 deletions

View File

@@ -65,7 +65,7 @@ export default async function medusaRequest(
const reshapeCart = (cart: MedusaCart): Cart => {
const lines = cart?.items?.map((item) => reshapeLineItem(item)) || [];
const totalQuantity = lines.length;
const totalQuantity = lines.reduce((a, b) => a + b.quantity, 0);
const checkoutUrl = '/';
const currencyCode = cart.region?.currency_code.toUpperCase() || 'USD';