so how could I get the controller from nop.Admin? Do I need get it from route?
There are six action with same actionname "Edit" and all use httppost. only difference is [FormValueRequired("markorderaspaid")]. is it possible to get the actionresult name?
so how could I get the controller from nop.Admin? Do I need get it from route?
If you can do "controllerContext.Controller is CustomerController", you can also do the same to capture OrderController. Just make sure the OrderController here is referring to Nop.Admin (instead of Nop.Web).
amyniu wrote:
There are six action with same actionname "Edit" and all use httppost. only difference is [FormValueRequired("markorderaspaid")]. is it possible to get the actionresult name?
Make sure the form has "markorderaspaid" submitted. In fact, just see how FormValueRequired is written. It is itself an action filter! ;)
it is working. It seems the code is executed before the function in the controller. is it possible to execute the override code after the function in the controller?
Error 3 'Nop.Plugin.CRM.Zoho.ZohoMarkasPaidActionFilter.OnActionExecuted(System.Web.Mvc.ActionExecutingContext)': no suitable method found to override C:\Users\Marketing\Itellengence Help\source code\nopCommerce_3.00_Source_2\Plugins\Nop.Plugin.CRM.Zoho\ZohoMarkasPaidActionFilter.cs 41 30 Nop.Plugin.CRM.Zoho
Object reference not set to an instance of an object. The details for the log entry.Full message: System.NullReferenceException: Object reference not set to an instance of an object. at Nop.Plugin.CRM.Zoho.ZohoRegistrarActionFilter.OnActionExecuting(ActionExecutingContext filterContext) at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter,
this is one part of the error msg, how to check this error? I think I should define a instance. I dont know which one.
Thanks, Amy
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.