DependencyRegistrar ? Order ? 4.10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 năm cách đây
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 năm cách đây
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 năm cách đây
Hi

Can I override "/orderdetails/989", and still use the same views ?
4 năm cách đây
Jensen wrote:
Hi

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


Yes, absolutely
4 năm cách đây
I only need to trigger some serverside code, when it shows orderdetails.
4 năm cách đây
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 năm cách đây
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 năm cách đây
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.