Redirect "Keep Shopping" button on basket.aspx

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Redirect "Keep Shopping" button on basket.aspx

Post by jdarby » Mon Oct 26, 2009 8:18 am

On basket.aspx, the "Keep Shopping" button seems to act like a Back button. When the user adds a product and then clicks "Keep Shopping" it brings them back to the product they just added. Is it possible to change this button to redirect the user somewhere else? I'd like it to bring them to the site's home page.

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

Re: Redirect "Keep Shopping" button on basket.aspx

Post by mazhar » Mon Oct 26, 2009 8:26 am

Edit ConLib/Basket.ascx.cs file and locate following code

Code: Select all

Response.Redirect(NavigationHelper.GetLastShoppingUrl());
and then replace it with

Code: Select all

//Response.Redirect(NavigationHelper.GetLastShoppingUrl());
        Response.Redirect(NavigationHelper.GetStoreUrl());

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Redirect "Keep Shopping" button on basket.aspx

Post by jdarby » Mon Oct 26, 2009 8:34 am

after making that change, I get the following error on Basket.aspx:

....ConLib\Custom\Basket.ascx.cs(251): error CS1501: No overload for method 'GetStoreUrl' takes '0' arguments

I'm running 7.0.2 b11659

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

Re: Redirect "Keep Shopping" button on basket.aspx

Post by mazhar » Mon Oct 26, 2009 9:10 am

Sorry I forgot to pass its required argument, here are the update lines

Code: Select all

//Response.Redirect(NavigationHelper.GetLastShoppingUrl());
Response.Redirect(NavigationHelper.GetStoreUrl(Page));

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Redirect "Keep Shopping" button on basket.aspx

Post by jdarby » Mon Oct 26, 2009 9:11 am

perfect, thanks!

Post Reply