DependencyRegistrar ? Order ? 4.10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 4 años
Hi

I have made a override to method Details in Nop.Web.Controllers.OrderController, but when I use DependencyRegistrar, to use my CustomOrderController it just ignores it.

I have set the Order to 3

Any one ?
Hace 4 años
I run into a similar issue previously as well while trying to override the methods of the controller and went with route override instead
Hace 4 años
Hi

Can I override "/orderdetails/989", and still use the same views ?
Hace 4 años
Jensen wrote:
Hi

Can I override "/orderdetails/989", and still use the same views ?


Yes, absolutely
Hace 4 años
I only need to trigger some serverside code, when it shows orderdetails.
Hace 4 años
In your case, no need to override action method. Rather at first delete OrderDetails route of Nop.Web project from your plugin route provider and add another route with url format orderdetails/{orderId:min(0)}. So whenever customer hit this url, your plugin controller action will be executed.
Hace 4 años
I still want to see the default view, when that route is hit.

I just want to add some extra code in just that method.
Hace 4 años
Got it wokring by using ActionFilterAttribute insted, thanks for all your ideas and help.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.