/// <summary>
        /// Prepare checkout progress model
        /// </summary>
        /// <param name="step">Step</param>
        /// <returns>Checkout progress model</returns>
        public virtual CheckoutProgressModel PrepareCheckoutProgressModel(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel {
                CheckoutProgressStep = step
            };

            return(model);
        }
        /// <summary>
        /// Prepare checkout progress model
        /// </summary>
        /// <param name="step">Step</param>
        /// <returns>
        /// A task that represents the asynchronous operation
        /// The task result contains the checkout progress model
        /// </returns>
        public virtual Task <CheckoutProgressModel> PrepareCheckoutProgressModelAsync(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel {
                CheckoutProgressStep = step
            };

            return(Task.FromResult(model));
        }
Example #3
0
        public IViewComponentResult Invoke(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel {
                CheckoutProgressStep = step
            };

            return(View(model));
        }
Example #4
0
        public ActionResult CheckoutProgress(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel()
            {
                CheckoutProgressStep = step
            };

            return(PartialView(model));
        }
Example #5
0
        public ActionResult CheckoutProgress(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel()
            {
                CheckoutProgressStep = step
            };

            var cart            = _workContext.CurrentCustomer.GetCartItems(ShoppingCartType.ShoppingCart, _storeContext.CurrentStore.Id);
            var shippingOptions = _shippingService.GetShippingOptions(cart, _workContext.CurrentCustomer.ShippingAddress, "", _storeContext.CurrentStore.Id).ShippingOptions;

            if (shippingOptions.Count <= 1 && _shippingSettings.SkipShippingIfSingleOption)
            {
                model.DisplayShippingOptions = false;
            }

            return(PartialView(model));
        }