public async Task <ActionResult> Cart(int[] updates, string checkout)
        {
            await _cartBuilder.GetOrCreateNewTransientCartAsync(WorkContext.CurrentStore, WorkContext.CurrentCustomer, WorkContext.CurrentLanguage, WorkContext.CurrentCurrency);

            await _cartBuilder.ChangeItemsQuantitiesAsync(updates);

            await _cartBuilder.SaveAsync();

            string virtualRedirectUrl = "~/cart";

            if (Request.Form.Get("checkout") != null)
            {
                virtualRedirectUrl = "~/cart/checkout";
            }

            return(StoreFrontRedirect(virtualRedirectUrl));
        }
        public async Task <ActionResult> Cart(int[] updates, string checkout)
        {
            string virtualRedirectUrl = "~/cart";

            EnsureThatCartExist();
            using (await AsyncLock.GetLockByKey(GetAsyncLockCartKey(_workContext.CurrentCart)).LockAsync())
            {
                await _cartBuilder.ChangeItemsQuantitiesAsync(updates);

                await _cartBuilder.SaveAsync();


                if (Request.Form.Get("checkout") != null)
                {
                    virtualRedirectUrl = "~/cart/checkout";
                }
            }
            return(StoreFrontRedirect(virtualRedirectUrl));
        }
        public async Task <ActionResult> Cart(int[] updates, string checkout)
        {
            await _cartBuilder.GetOrCreateNewTransientCartAsync(WorkContext.CurrentStore, WorkContext.CurrentCustomer, WorkContext.CurrentLanguage, WorkContext.CurrentCurrency);

            await _cartBuilder.ChangeItemsQuantitiesAsync(updates);

            await _cartBuilder.SaveAsync();

            string virtualRedirectUrl = "~/cart";

            if (Request.Form.Get("checkout") != null)
            {
                if (_cartBuilder.Cart.HasPhysicalProducts)
                {
                    virtualRedirectUrl = "~/cart/checkout/#/shipping-address";
                }
                else
                {
                    virtualRedirectUrl = "~/cart/checkout/#/payment-method";
                }
            }

            return(StoreFrontRedirect(virtualRedirectUrl));
        }