diff --git a/Website/DesktopModules/Hotcakes/Core/Controllers/CheckoutController.cs b/Website/DesktopModules/Hotcakes/Core/Controllers/CheckoutController.cs index 9d534d25..0f4d3812 100644 --- a/Website/DesktopModules/Hotcakes/Core/Controllers/CheckoutController.cs +++ b/Website/DesktopModules/Hotcakes/Core/Controllers/CheckoutController.cs @@ -99,6 +99,11 @@ protected bool IsOrderConfirmed [NonCacheableResponseFilter] public ActionResult Index() { + if (CurrentCart == null || CurrentCart.Items == null || CurrentCart.Items.Count == 0) + { + return Redirect(Url.RouteHccUrl(HccRoute.Cart)); + } + var model = LoadCheckoutModel(); HccApp.AnalyticsService.RegisterEvent(HccApp.CurrentCustomerId, ActionTypes.GoToChekout, null); VerifySessionError(model); @@ -569,9 +574,6 @@ public ActionResult ApplyEUVatRules() private CheckoutViewModel LoadCheckoutModel() { - if (CurrentCart == null || CurrentCart.Items == null || CurrentCart.Items.Count == 0) - Redirect(Url.RouteHccUrl(HccRoute.Cart)); - var model = new CheckoutViewModel { CurrentOrder = CurrentCart }; LoadCurrentCustomer(model);