Get List of All Order
See original GitHub issueHi, I need some help in getting all orders. I am using following code and trying to get all orders.
` public class OrderController { private OrderService service = null;
public OrderController(string shopURL, string shopAccessToken)
{
service = new OrderService(shopURL, shopAccessToken);
}
public List<Order> GetAllOrders()
{
List<Order> allOrders = new List<Order>();
var all_orders = service.ListAsync().Result; //return only 1
//following code also return only 1
ListResult<Order> batch = service.ListAsync(new ListFilter<Order>("", 250)).Result;
while (true)
{
allOrders.AddRange(batch.Items);
if (!batch.HasNextPage)
{
break;
}
batch = service.ListAsync(batch.GetNextPageFilter()).Result;
}
return allOrders;
}
}
`
but it returns only unfulfilled orders. I need list of all order does not matter what the status is
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
SQL query to bring back all orders only if ...
SQL query to bring back all orders only if all order details are in a list ; SELECT · FROM · IN ·...
Read more >Lists in All Orders
Click this icon to open the Item List. You can also get to all the lists from the List menu. In All Orders...
Read more >Select all orders which have the same order items
I need to fetch all orders which have the same cart (same list of order items and quantity). Here are my tables: orders...
Read more >Is there a way to get a list with all the items and their ...
Is there a way to get a list with all the items and their quantities for all all open orders via either the...
Read more >Solved: Help to find and list all Order ID's from users wh...
What I wish to achieve is to find and list all Order ID's from users who have placed more than 2 orders in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Got it
this worked
var of = new OrderListFilter() { Status = “any”, Limit = 250 }; ListResult<Order> batch = service.ListAsync(of).Result;
Filter status doesn’t work and in an item, the variable doesn’t find a status variable. (I try found orders open and paid for insert in another system)