Page 1 of 1

Redirect Keep Shopping to last category visited?

Posted: Wed Jul 22, 2009 11:33 am
by ZLA
After adding a product to the cart, if you click on Keep Shopping from the cart, it takes you to the product you just entered. Is there a way to determine the last visited category and redirect to it? If no category was last visited (say if we got to the cart directly from the home page) then I would want to redirect to the home page.

Is this simple? I didn't see anything built in to the navigation helper.

Re: Redirect Keep Shopping to last category visited?

Posted: Fri Jul 24, 2009 6:10 am
by mazhar
One basket page use following code to redirect to category.

Code: Select all

Category category = CategoryDataSource.Load(PageHelper.GetCategoryId(true));
Response.Redirect(category.NavigateUrl);

Re: Redirect Keep Shopping to last category visited?

Posted: Fri Jul 24, 2009 6:13 am
by ZLA
Thanks Mazhar.

Re: Redirect Keep Shopping to last category visited?

Posted: Mon Jul 18, 2011 9:07 pm
by kens
I know this is an old post, but....

Will this code work as presented in 7.04.

Thanks

Ken

Re: Redirect Keep Shopping to last category visited?

Posted: Wed Aug 03, 2011 4:29 am
by plugables
Yes it should work in 7.0.4.