add extra group price
This commit is contained in:
@@ -628,11 +628,7 @@ export const selectCartTotal = (state: RootState) =>
|
||||
state.order.items.reduce(
|
||||
// (total, item) => total + item.price * item.quantity,
|
||||
(total, item) => {
|
||||
const extrasPrice = (item.extras || []).reduce(
|
||||
(extraTotal, extraItem) => extraTotal + extraItem.price,
|
||||
0,
|
||||
);
|
||||
const itemTotalPrice = (item.price + extrasPrice) * item.quantity;
|
||||
const itemTotalPrice = item.price * item.quantity;
|
||||
return total + itemTotalPrice;
|
||||
},
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user