fix checkout/cart
This commit is contained in:
@@ -285,8 +285,19 @@ class _CartPageState extends ConsumerState<CartPage> {
|
||||
_isSyncing = false;
|
||||
});
|
||||
|
||||
// Navigate to checkout
|
||||
context.push(RouteNames.checkout);
|
||||
// Get selected CartItemData objects
|
||||
// Pass complete CartItemData to preserve conversion calculations
|
||||
final selectedCartItems = cartState.items
|
||||
.where((item) =>
|
||||
cartState.selectedItems[item.product.productId] == true)
|
||||
.toList();
|
||||
|
||||
// Navigate to checkout with CartItemData
|
||||
// Checkout page will fetch fresh pricing from API
|
||||
context.push(
|
||||
RouteNames.checkout,
|
||||
extra: {'cartItems': selectedCartItems},
|
||||
);
|
||||
}
|
||||
}
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user