public ActionResult OrderConfirmation([Bind(Prefix = StorefrontConstants.QueryStrings.ConfirmationId)] string confirmationId) { var viewModel = new OrderConfirmationViewModel(); var order = _checkoutRepository.GetCommerceOrder(confirmationId); viewModel.Initialize(this.CurrentRendering, confirmationId, order); return(View("OrderConfirmation", viewModel)); }
public ActionResult OrderConfirmation([Bind(Prefix = ConfirmationIdQueryString)] string confirmationId) { var viewModel = new OrderConfirmationViewModel(); if (!string.IsNullOrWhiteSpace(confirmationId)) { var order = this.Session["NewOrder"] as CommerceOrder; if (order == null) { order = new CommerceOrder() { Status = Sitecore.Commerce.Connect.DynamicsRetail.Texts.Pending }; viewModel.Initialize(RenderingContext.Current.Rendering, order.TrackingNumber, OrderManager.GetOrderStatusName(order.Status)); } viewModel.Initialize(RenderingContext.Current.Rendering, confirmationId, order.Status); } return(View(viewModel)); }
public ActionResult OrderConfirmation([Bind(Prefix = ConfirmationIdQueryString)] string confirmationId) { var viewModel = new OrderConfirmationViewModel(); if (!string.IsNullOrWhiteSpace(confirmationId)) { var response = OrderManager.GetOrderDetails(CommerceUserContext.Current.UserId, confirmationId); if (response.ServiceProviderResult.Success) { var order = response.Result; viewModel.Initialize(RenderingContext.Current.Rendering, order.TrackingNumber, OrderManager.GetOrderStatusName(order.Status)); } } return(View(viewModel)); }
public ActionResult OrderConfirmation([Bind(Prefix = StorefrontConstants.QueryStrings.ConfirmationId)] string confirmationId) { var viewModel = new OrderConfirmationViewModel(); CommerceOrder order = null; if (!string.IsNullOrWhiteSpace(confirmationId)) { var response = this.OrderManager.GetOrderDetails(this.CurrentStorefront, this.CurrentVisitorContext, confirmationId); if (response.ServiceProviderResult.Success) { order = response.Result; } } viewModel.Initialize(this.CurrentRendering, confirmationId, order); return(View(this.CurrentRenderingView, viewModel)); }