Hi,
I have managed to tap into the product save button action using code below:
public IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
{
if ((controllerContext.Controller is ProductController
&& actionDescriptor.ActionName.Equals("Edit", StringComparison.InvariantCultureIgnoreCase)
&& controllerContext.HttpContext.Request.HttpMethod == "POST"))
{
return new List<Filter>() { new Filter(this, FilterScope.Action, 0) };
}
return new List<Filter>();
}
The next step i would like to do is to get the view model of my plugin. It is a custom tab in product page. I have added the custom tab using IConsumer<AdminTabStripCreated>. The problem is that in the filter, I only managed to get nop.admin productcontroller product model. How can i get my custom tab model when product page save button is fired?