DependencyRegistrar ? Order ? 4.10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 года назад
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 ?
4 года назад
I run into a similar issue previously as well while trying to override the methods of the controller and went with route override instead
4 года назад
Hi

Can I override "/orderdetails/989", and still use the same views ?
4 года назад
Jensen wrote:
Hi

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


Yes, absolutely
4 года назад
I only need to trigger some serverside code, when it shows orderdetails.
4 года назад
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.
4 года назад
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.
4 года назад
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.