protected void Page_Load(object sender, EventArgs e) { LoadResourceFileSettings(); CartController cartController = new CartController(StoreContext); UserCart = cartController.GetCart(false); pnlEmptyCart.Visible = (UserCart.ItemCount <= 0); pnlCart.Visible = !pnlEmptyCart.Visible; }
private void RemoveCartItemFromCart(int cartItemId) { cartController.RemoveCartItemFromCart(cartItemId); DataModel.Cart cart = cartController.GetCart(false); if (cart.CartItemCollectionByCartId.Count == 0) { // remove all coupons if we have an empty cart checkoutOrderInfo.RemoveAllCoupons(); } }