public void RemoveFromCart(IEnumerable <string> skuIds, long memberId, long shopBranchId) { if (memberId > 0) { CartApplication.DeleteShopBranchCartItem(skuIds, memberId, shopBranchId); } else { string cartInfo = WebHelper.GetCookie(CookieKeysCollection.HIMALL_CART_BRANCH); if (!string.IsNullOrWhiteSpace(cartInfo)) { string[] cartItems = cartInfo.Split(','); string newCartInfo = string.Empty; foreach (string cartItem in cartItems) { string[] cartItemParts = cartItem.Split(':'); string cartItemSkuId = cartItemParts[0]; string cartItemshopBranchId = cartItemParts[2]; if (!skuIds.Contains(cartItemSkuId) && shopBranchId.ToString() != cartItemshopBranchId) { newCartInfo += "," + cartItem; } } if (!string.IsNullOrWhiteSpace(newCartInfo)) { newCartInfo = newCartInfo.Substring(1); } WebHelper.SetCookie(CookieKeysCollection.HIMALL_CART_BRANCH, newCartInfo); } } }