Page 1 of 1

submit product review without email

Posted: Fri May 22, 2009 9:02 am
by triplw
I would to set up the product reviews so that registered users don't have to login to post. Now if they write a review before they are logged in they are told they have to login. Then they are redirected to the home page and the review is lost.

Can anyone help?

Re: submit product review without email

Posted: Fri May 22, 2009 9:33 am
by mazhar
One quick workaround could be to first edit your ConLib/ProductReviewForm.ascx and then locate following line of code

Code: Select all

<asp:HyperLink ID="LoginLink"  runat="server" Text="Login" NavigateUrl="../Login.aspx" SkinID="Button" EnableViewState="False"></asp:HyperLink>
and change it to

Code: Select all

<asp:HyperLink ID="LoginLink"  runat="server" Text="Login" NavigateUrl="../Login.aspx?ReturnUrl={0}" SkinID="Button" EnableViewState="False"></asp:HyperLink>
Now edit your ConLib/ProductReviewForm.ascx.cs file and locate following code

Code: Select all

if (!Page.IsPostBack) InitializeForm();
and make it look like

Code: Select all

Product product = ProductDataSource.Load(_ProductId);
        LoginLink.NavigateUrl = string.Format(LoginLink.NavigateUrl, product.NavigateUrl);
        if (!Page.IsPostBack) InitializeForm();
When you are done with changes try to login and place review now it will redirect you to product page instead default page.