Exemplo n.º 1
0
        public virtual async Task <IActionResult> GetEstimateShipping(string countryId, string stateProvinceId, string zipPostalCode, IFormCollection form)
        {
            var cart = _shoppingCartService.GetShoppingCart(_storeContext.CurrentStore.Id, ShoppingCartType.ShoppingCart, ShoppingCartType.Auctions);

            //parse and save checkout attributes
            await _shoppingCartViewModelService.ParseAndSaveCheckoutAttributes(cart, form);

            var model = await _shoppingCartViewModelService.PrepareEstimateShippingResult(cart, countryId, stateProvinceId, zipPostalCode);

            return(PartialView("_EstimateShippingResult", model));
        }
Exemplo n.º 2
0
        public virtual IActionResult GetEstimateShipping(string countryId, string stateProvinceId, string zipPostalCode, IFormCollection form)
        {
            var cart = _workContext.CurrentCustomer.ShoppingCartItems
                       .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart || sci.ShoppingCartType == ShoppingCartType.Auctions)
                       .LimitPerStore(_storeContext.CurrentStore.Id)
                       .ToList();

            //parse and save checkout attributes
            _shoppingCartViewModelService.ParseAndSaveCheckoutAttributes(cart, form);
            var model = _shoppingCartViewModelService.PrepareEstimateShippingResult(cart, countryId, stateProvinceId, zipPostalCode);

            return(PartialView("_EstimateShippingResult", model));
        }