redirect to cart after new customer

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
this is in addition to the following post i asked a few days ago

https://www.nopcommerce.com/boards/t/16712/redirect-to-cart-after-guest-login-during-checkout.aspx

i changed the shopping cart code to this (which is what is as of the march 30 changeset)

   if (_workContext.CurrentCustomer.IsGuest())
            {
                if (_orderSettings.AnonymousCheckoutAllowed)
                {
                    return RedirectToRoute("LoginCheckoutAsGuest", new { returnUrl = Url.RouteUrl("ShoppingCart") });
                }
                else
                {
                    return new HttpUnauthorizedResult();//RedirectToRoute("Login");
                }
            }
            else
            {
                return RedirectToRoute("Checkout");
            }

where the customer is redirected to their shopping cart after they login, which works perfect

but it doesnt do the same if they create a new account on that page,(instead of logging in), i have not been able to make that happen, i know it will only wotk if email validatin is not in place which means i have only the standard account creation in place
Il y a 5 ans
hacknop wrote:
this is in addition to the following post i asked a few days ago

https://www.nopcommerce.com/boards/t/16712/redirect-to-cart-after-guest-login-during-checkout.aspx

i changed the shopping cart code to this (which is what is as of the march 30 changeset)

   if (_workContext.CurrentCustomer.IsGuest())
            {
                if (_orderSettings.AnonymousCheckoutAllowed)
                {
                    return RedirectToRoute("LoginCheckoutAsGuest", new { returnUrl = Url.RouteUrl("ShoppingCart") });
                }
                else
                {
                    return new HttpUnauthorizedResult();//RedirectToRoute("Login");
                }
            }
            else
            {
                return RedirectToRoute("Checkout");
            }

where the customer is redirected to their shopping cart after they login, which works perfect

but it doesnt do the same if they create a new account on that page,(instead of logging in), i have not been able to make that happen, i know it will only wotk if email validatin is not in place which means i have only the standard account creation in place
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.