Close

customer not returned to cart after registration (urgent)

milo
11 years ago
#1941 Quote
Avatar
  • 14
hi,

I'm working on a upgrade to 2.7 with the fashion theme.
If a guest wants to check-out and registrers the users is redirected to the homepage instead of the check-out page.

This is issue should be resolved in standard nopCommerce 2.7 (i checked it works with the default theme). There is ReturnUrl specified in the Fashion but doesn't work.
I noticed that the url's are different, maybe this helps.

standard nopC:     /login/checkoutasguest?returnUrl=%2Fcart
fashion theme:      /login?ReturnUrl=%2fcart

Note: I dont use the one-page checkout.

Please give me a solution and fix this in the next release.
IvanStoyanov
11 years ago
#1943 Quote
Avatar
  • 269
milo wrote:
hi,

I'm working on a upgrade to 2.7 with the fashion theme.
If a guest wants to check-out and registrers the users is redirected to the homepage instead of the check-out page.

This is issue should be resolved in standard nopCommerce 2.7 (i checked it works with the default theme). There is ReturnUrl specified in the Fashion but doesn't work.
I noticed that the url's are different, maybe this helps.

standard nopC:     /login/checkoutasguest?returnUrl=%2Fcart
fashion theme:      /login?ReturnUrl=%2fcart

Note: I dont use the one-page checkout.

Please give me a solution and fix this in the next release.


Hi milo,

Thank you for reporting this problem. We implemented the fix to the Fashion theme.

You can download the package, replace the Fashion folder that is located in the Themes folder with the Fashion folder located in the package and you are good to go.

NOTE: If you have done any modifications to the theme, you need to merge your modifications to the Fashion folder in the package before replacing.

Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!
milo
11 years ago
#1946 Quote
Avatar
  • 14
Hi Ivan,

Can you specify the changes in code or only the name of the files which are modified?
This would help me alot because I currently have a lot of changes in CSS and views and I don't have any merge tool (currently working in notepad :-) )

Thanks.
IvanStoyanov
11 years ago
#1947 Quote
Avatar
  • 269
milo wrote:
Hi Ivan,

Can you specify the changes in code or only the name of the files which are modified?
This would help me alot because I currently have a lot of changes in CSS and views and I don't have any merge tool (currently working in notepad :-) )

Thanks.


We changed Themes/Fashion/Views/Customer/Login.cshtml

Best wishes.

Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!
milo
11 years ago
#1948 Quote
Avatar
  • 14
Many thanks!
milo
11 years ago
#1949 Quote
Avatar
  • 14
I modified the login page, added the following lines:

@using Nop.Core;
@using Nop.Core.Infrastructure;
@using Nop.Core.Infrastructure.DependencyManagement;

...

    //register URL with return URL (if specified)
    var registerUrl = Url.RouteUrl("Register");
    if (!String.IsNullOrEmpty(this.Context.Request.QueryString["returnUrl"]))
    {
        var webHelper = EngineContext.Current.Resolve<IWebHelper>();
        registerUrl = webHelper.ModifyQueryString(registerUrl, "returnurl=" +       HttpUtility.UrlEncode(this.Context.Request.QueryString["returnUrl"]), null);
    }


Unfortunately still not working!(?) After I register, I'm sent back to the homepage.
This is also the case on your demo of the fashion theme.
Should the code also be added to the Register.cshtml page? It seems it doesn't recieve the returnurl parameter?
Support
11 years ago
#1950 Quote
Avatar
  • Moderator
  • 1044
Hi milo,

You should also use the new registerUrl when the Register button is clicked on the Login page.

So to do that open the ~/Themes/Fashion/Views/Customer/Login.cshtml file and update the following two:

line 116: <input type="submit" class="registerbutton button-oval gray" onclick="location.href='@registerUrl'" value="@T("Account.Register")" />

and the following line:

line 139: <input type="submit" value="@T("Account.Register")" class="registerbutton button-oval gray" onclick="location.href='@registerUrl'" />

The text in bold is the new one that should be changed. So use the registerUrl variable instead of Url.RouteUrl("Register")

Hope that helps!
milo
11 years ago
#1988 Quote
Avatar
  • 14
thanks, it works now!
please update in future releases.
castironcook
11 years ago
#1991 Quote
Avatar
  • 13
BIG THANKS!
I've been desperate to make this fix, too.  Can I just download the theme and replace a few files, too?   I've tried to keep my theme modifications to a minimum, but there are always some.
I am also using nop 2.7 and the Fashion theme 2.70.
IvanStoyanov
11 years ago
#1992 Quote
Avatar
  • 269
castironcook wrote:
BIG THANKS!
I've been desperate to make this fix, too.  Can I just download the theme and replace a few files, too?   I've tried to keep my theme modifications to a minimum, but there are always some.
I am also using nop 2.7 and the Fashion theme 2.70.


Hi castironcook,

Yes, of course you can.
Just use the following instructions:

Support wrote:
Hi milo,

You should also use the new registerUrl when the Register button is clicked on the Login page.

So to do that open the ~/Themes/Fashion/Views/Customer/Login.cshtml file and update the following two:

line 116: <input type="submit" class="registerbutton button-oval gray" onclick="location.href='@registerUrl'" value="@T("Account.Register")" />

and the following line:

line 139: <input type="submit" value="@T("Account.Register")" class="registerbutton button-oval gray" onclick="location.href='@registerUrl'" />

The text in bold is the new one that should be changed. So use the registerUrl variable instead of Url.RouteUrl("Register")

Hope that helps!
Thank you for choosing our products! Your feedback is important to us!