How to access order info in View Component of Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Hi
I would like to access the order info ( customer detail, total ,item list) im my view component fo my plugin.
Is there any OrderContext that i can use ?
Regards
3 years ago
Hi ,
blochaou ,

there is no orderContext available ,
but if you can get order by customer Id or you can get the specific order by calling action filter
3 years ago
In your component class constructor, you can inject any services you like (similar to how you do it in your controller class).  Inject IWorkContext, ICustomerService, IOrderService, etc. and use appropriate service methods.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.