Overriding AddToCart/Detail (or any controller action)

2 years ago
Just wondering what the best practice for this is? As it is now, I simply changed the default controller behavior but I would rather put this in my overridden controller Action. The reason being, easier to maintain for updates etc.

Is there an example of this in the Docs for instance?
2 years ago
Personally, I avoid changing the base code, so when I need to make a change to an action, I build a filter. The mechanics of this have changed with Asp.Net Core, but the basic process is the same.

What tripped me up some was figuring out how to install a global action filter. The answer is to build a class that implements INopStartup. This allows you to add your filter.

I'd agree that this is certainly something that needs to be documented. The documentation is sadly lacking for nop in my opinion.
2 years ago
Question is, how do you capture just parts of an action? AddToCart has two different methods for catalog and detail. I just need to tweak the behavior. Not change it totally.

Like you said. The docs leave a lot to be desired in this area.

Nop should introduce something like Nop.TV and make some money on tutorials for advanced development :).