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
Hello,
what is the best way to get the order history of a member? I like to select all orders with orderstatus paied or completed. And I like to do this in C# via the API? Is it possible? And if how?
Thanks in advance,
Stefan Volkmer
I have made a simple extension (made some untested changes before posting - but i think you can get some idears):
public static IEnumerable<PurchaseOrder> GetCompletedOrders(this Customer customer) { return PurchaseOrder.All().Where( x => x.Customer.CustomerId == customer.CustomerId && x.OrderStatus.OrderStatusId > 1 && x.OrderStatus != OrderStatus.Get((int)OrderStatusCode.Cancelled)); }
Is that what you are looking for? I have some markup aswell?
Wow !!! That was fast ;)
Thanks that exactly what I was looking for!
A small request: If you mark the question as answered, it's easier to keep track of questions that needs attention:)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Best way for member Order History
Hello,
what is the best way to get the order history of a member? I like to select all orders with orderstatus paied or completed. And I like to do this in C# via the API? Is it possible? And if how?
Thanks in advance,
Stefan Volkmer
I have made a simple extension (made some untested changes before posting - but i think you can get some idears):
Is that what you are looking for? I have some markup aswell?
Wow !!! That was fast ;)
Thanks that exactly what I was looking for!
A small request: If you mark the question as answered, it's easier to keep track of questions that needs attention:)
is working on a reply...