Exemplo n.º 1
0
        public IViewComponentResult Invoke(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel {
                CheckoutProgressStep = step
            };

            return(View(model));
        }
        /// <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);
        }
Exemplo n.º 3
0
        public ActionResult CheckoutProgress(CheckoutProgressStep step)
        {
            var model = new CheckoutProgressModel()
            {
                CheckoutProgressStep = step
            };

            return(PartialView(model));
        }
Exemplo n.º 4
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));
        }
Exemplo n.º 5
0
 public ActionResult CheckoutProgress(CheckoutProgressStep step)
 {
     var model = new CheckoutProgressModel() { CheckoutProgressStep = step };
     return PartialView(model);
 }
Exemplo n.º 6
0
        public IViewComponentResult Invoke(CheckoutProgressStep step)
        {
            var model = _checkoutModelFactory.PrepareCheckoutProgressModel(step);

            return(View(model));
        }
Exemplo n.º 7
0
        public async Task <IViewComponentResult> InvokeAsync(CheckoutProgressStep step)
        {
            var model = await _checkoutModelFactory.PrepareCheckoutProgressModelAsync(step);

            return(View(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));
        }