private static List <cart_keys> GetCart() { List <cart_keys> cartKeysList = new List <cart_keys>(); string cookies = ShopCart.GetCookies(); if (!string.IsNullOrEmpty(cookies)) { return(JsonHelper.JSONToObject <List <cart_keys> >(cookies)); } return((List <cart_keys>)null); }
public static int GetQuantityCount() { string cookies = ShopCart.GetCookies(); int num = 0; if (!string.IsNullOrEmpty(cookies)) { List <cart_keys> cartKeysList = JsonHelper.JSONToObject <List <cart_keys> >(cookies); if (cartKeysList != null) { foreach (cart_keys cartKeys in cartKeysList) { num += cartKeys.quantity; } } } return(num); }