submit product review without email

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
triplw
Commander (CMDR)
Commander (CMDR)
Posts: 144
Joined: Sat Jan 12, 2008 5:34 pm
Contact:

submit product review without email

Post by triplw » Fri May 22, 2009 9:02 am

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?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: submit product review without email

Post by mazhar » Fri May 22, 2009 9:33 am

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.

Post Reply