public ActionResult AddToCart(StoreItem storeItem)
        {
            try
            {
                var sg = new StoreGateway();
                var shoppingCartId = StoreGateway.GetShoppingCartId(HttpContext);
                StoreShoppingCart cart = null;

                if (shoppingCartId == null)
                {
                    cart = sg.CreateNewShoppingCart(storeItem.Store.MerchantId, RDN.Library.Classes.Account.User.GetUserId(), true, Request.UserHostAddress);
                    StoreGateway.SetShoppingCartSession(cart.ShoppingCartId, HttpContext);
                }
                else
                    cart = sg.GetShoppingCart(shoppingCartId.Value);

                int quantity = Convert.ToInt32(Request.Form["quantityToBuy"]);

                sg.AddItemToCart(cart.ShoppingCartId, storeItem.Store.MerchantId, storeItem.StoreItemId, quantity, storeItem.ItemSizeEnum, storeItem.ColorTempSelected);
                this.AddItemToCart(HttpContext.Session, quantity);
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            return Redirect(Url.Content("~/roller-derby-item/" + RDN.Utilities.Strings.StringExt.ToSearchEngineFriendly(storeItem.Name) + "/" + storeItem.StoreItemId));

        }
 private StoreShoppingCart GetCartForRdnStore()
 {
     var shoppingCartId = GetShoppingCartId();
     StoreShoppingCart cart = null;
     var sg = new StoreGateway();
     if (shoppingCartId == null)
     {
         cart = sg.CreateNewShoppingCart(null, RDN.Library.Classes.Account.User.GetUserId(), true, Request.UserHostAddress);
         Session.Add("ShoppingCartId", cart.ShoppingCartId);
     }
     else
         cart = sg.GetShoppingCart(shoppingCartId.Value);
     return cart;
 }