Skip to content

Commit

Permalink
CheckoutController.cs:
Browse files Browse the repository at this point in the history
- Updated CurrentCart null contition location.
  • Loading branch information
ismael.triana committed Dec 16, 2022
1 parent 08d0740 commit 104713e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 104713e

Please sign in to comment.