Skip the shopping cart popup (order summary) for every product added to cart

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
Is it possible to skip the shopping cart summary that pops up for every product I add to the chart?
All the clicking continue (in the shopping cart summary) scare the customers away.
13 年 前
Hi,

I've never done it, but anything is possible. It'll involve some fairly tedious running through of the code (there is a hell of a lot going on in there) but it is likely to be a simple Response.Redirect("~/basket.aspx") or something in the method that does the add to basket.

If this is v1.5+, there a rather convoluted set of methods that do some error checking before adding to the basket, which will drive you mad, so I'd probably just look for a redirect at the end of the method and //comment it out and see what happens? (In a dev version of course).

And [if it is indeed this simple] the beauty of nop is shown in the settings manager. You could easily add a setting, like Shopping.RedirectToBasket and set it to true/false, and wrap the redirect in a check.

I'll just have a look in the code now and see, as I'm getting curious...

Update:

Yep, it is a simple redirect.

There are going to be a few places that this will need to be changed, but the first one I found was in OneVariant.ascx.cs in the Templates/products folder.

Line 225+ is:

if(addToCartWarnings.Count == 0)
{
     Response.Redirect("~/ShoppingCart.aspx");
}

So you could just do your bit there. Just comment it out.

If you add another if in the if statement (sounds a bit iffy to me!) with the SettingManager.GetSettingValueBoolean("Setting.Name.Here");, you could make it a bit more re-usable, but this is probably something best added to the base nop code.

HTH.
13 年 前
Thanks for the answer, I hope this change will be in the next release of the NopCommerce, cause I think this is something everyone, or at least most people, wants.
I am not releasing my site until after summer so I can probably wait a little bit and hope for the changes to be implemented, otherwise I will have to do it myself with the help of your post above.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.