how to use Product Model Factory in Widget or plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hello,

I want to build a new custom widget( it's my first one and so my question is vary basic ) in some case need to call _productModelFactory.PrepareProductOverviewModels , but the problem is that I dont know how I have to define and initialize _productModelFactory,

I check the plugin source code but I can't find similar usage, Would some one please help me how can I do this?
6 years ago
ashian wrote:
Hello,

I want to build a new custom widget( it's my first one and so my question is vary basic ) in some case need to call _productModelFactory.PrepareProductOverviewModels , but the problem is that I dont know how I have to define and initialize _productModelFactory,

I check the plugin source code but I can't find similar usage, Would some one please help me how can I do this?


You will need to use the IProductModelFactory interface. Inject into your service class or whatever class is doing needs it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.