/// <summary> /// Removes all products from the cart /// </summary> public void RemoveAll() { if (!mIsSearching) { foreach (var item in CurrentCart) { Items.Remove(item); } } // Make the product available to be added in another cart foreach (OrderRowViewerViewModel item in CurrentCart) { item.ProductViewModel.IsOutFromCart = true; } CurrentCart.Clear(); OnPropertyChanged(nameof(TotalPrice)); }
public ViewResult Completed() { cart.Clear(); return(View()); }