Maintenance Mode

The Ecommerce University Forums are under maintenance, and has been placed into read-only mode. Thank you for your understanding.

d
Topic
jon_groth34 Member
Posts:
1
5 days ago

Retrieving New Orders

Hello all, I'm using python to create an application that can search through all the orders without talking directly to Shopify. I'm creating a csv file that saves all of the orders, then the application searches through that. My problem is that when I use 

a = shopify.Order.find(status='closed', limit=50, page=i)
for order in a:
    database.append(order.attributes)

After that I went on to have it be added to a csv file, and it worked great. I wanted to make an "update" function, where instead of reading through all 21,000 orders again, it could just read through the most recent ones and stop once it hits the order number of the most recent order on the csv, in this case #21478. My problem is that the function won't pull any orders higher than #21478. I tried deleting the app on Shopify and creating new credentials, but that didn't work. Does anyone have any advice on how I can make it refresh with new orders?

Thank you for the help!