Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
has anyone an example of how to get all vendr orders via a webservice?
I found an example by Matt how to get all orders by a customer
https://gist.github.com/mattbrailsford/a9cc7768756ec87e30fa4494820bec27
But I cannot adapt this to my webservice.
Main problem is how to instantiate orderservice. In Umbraco v7 to instantiate ContentService I would just do it like so:
var contentService = ApplicationContext.Current.Services.ContentService;
Is there a similar way for the IOrderService?
Thanks
Hi,
The best way is to inject the IOrderService into your controller, if you are using one. Else you can do something like this:
var orderService = Umbraco.Core.Composing.Current.Factory.GetInstance(typeof(IOrderService)) as IOrderService;
Let me know if it worked!
-Joep
Hi Joep,
it works! Thank you very much for your help!
Edi
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to get orders via webservice
Hi there,
has anyone an example of how to get all vendr orders via a webservice?
I found an example by Matt how to get all orders by a customer
https://gist.github.com/mattbrailsford/a9cc7768756ec87e30fa4494820bec27
But I cannot adapt this to my webservice.
Main problem is how to instantiate orderservice. In Umbraco v7 to instantiate ContentService I would just do it like so:
Is there a similar way for the IOrderService?
Thanks
Hi,
The best way is to inject the IOrderService into your controller, if you are using one. Else you can do something like this:
Let me know if it worked!
-Joep
Hi Joep,
it works! Thank you very much for your help!
Edi
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.