Bharat
Bharat

Reputation: 6095

How to Override Controller or it's method in NopCommerce Plugin?

I am creating a plugin for price range filter. all design parts are done.

Now i want to Override ActionResult method Category of CatalogController.

I did lots of R&D, all of them are creating new methods so they don't need to Override existing one.

I am Stucked Here from last 10 hours, can anyone please help me?

Upvotes: 1

Views: 782

Answers (1)

mariann
mariann

Reputation: 456

You can derive your plugin controller from existing CatalogController to avoid code duplication, and then you have to create a new route in your plugin RouteProvider class (with appropriate priority) to replace existing route and use your own action method.

Upvotes: 3

Related Questions