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 года назад
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 года назад
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 года назад
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.