pkwarner Posted May 20, 2014 Share Posted May 20, 2014 Hello all, Been banging my head against the wall pondering this question for 2 weeks now. Basically, I'm trying to calculate the total income generated from a specific order. Sounds simple enough... Please note I am trying to accomplish this through the API. From what I can tell there is no way to do this. I've attempted to grab the data from the invoices but as far as I can tell invoices are not associated with the order ID anywhere. Same goes for orders, transactions, products, etc. I cannot find anywhere where a payment has any association with an order ID. Am I missing something? I very much appreciate any help anyone is able to give. Regards, Patrick 0 Quote Link to comment Share on other sites More sharing options...
stuntnmore Posted May 22, 2014 Share Posted May 22, 2014 You would have to setup a MySQL query to select the database and pull the data via return 0 Quote Link to comment Share on other sites More sharing options...
pkwarner Posted May 23, 2014 Author Share Posted May 23, 2014 I have attempted that but I cant find the relationship in the database to query for. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 23, 2014 Share Posted May 23, 2014 From what I can tell there is no way to do this. I've attempted to grab the data from the invoices but as far as I can tell invoices are not associated with the order ID anywhere. Same goes for orders, transactions, products, etc. I cannot find anywhere where a payment has any association with an order ID. always remember than an invoice doesn't need to have an order id; an order doesn't need to have an invoice (in which case, it's invoice value will be 0 in the database). have you had a look at the reports ? invoices and transactions I guess would be the ones - if you take a look at the source for each (it's not encrypted), they may give you a clue as to the sql query to use in your API code. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.