Checkout sends me back to home page Version 2.4

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
I've selected the one page checkout feature.  When I try to checkout from the cart, I am presented with the login page after logging in, I am immediately sent to the home page.  Is this happening to anyone else?
13 年 前
I fixed the problem by stepping through the code.  I noticed that returnUrl in the Login action was null causing it to return to the homepage.  I fixed the following code starting on line 832 of CheckoutController.cs in StartCheckout Action:


            if (_workContext.CurrentCustomer.IsGuest())
            {
                if (_orderSettings.AnonymousCheckoutAllowed)
                {
                    return RedirectToRoute("LoginCheckoutAsGuest", new { returnUrl = "/checkout" });
                }
                else
                {
                    return RedirectToRoute("Login", new { returnUrl = "/checkout" });
                }
            }
            else
            {
                return RedirectToRoute("Checkout");
            }
13 年 前
Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.