Zen Follower
- Join Date:
- Aug 2005
- Posts:
- 130
- Plugin Contributions:
- 0
Sending order info to other database for keeping a ledger
So I have my Zen-Cart working great but I needed a ledger to keep track of my income and expenses. I wrote one up in PHP and it's nice because it allows me to enter transactions that record important info.
Here is a picture of what it looks like: 
This is a simple database that has a table named 'transactions' and then about 10 fields of various info I want to keep track of per transaction.
Now to make things easier I would love it if through the Zen admin area I could have Zen connect to and write an order's data as a new transaction. I think a good place to put this would be on the orders screen. A simple link that would say something like "Insert this into Ledger DB".
I looked at the orders.php file but couldn't figure out how to do it. Basically I just need someone to tell me where in the admin code to look to pull a transaction's info (for this example let's say order id, price and order date)... if I knew that then I could just pass those variables to my script and let it insert them, something like <a href="/myLedgerScript.php?action=insertTrans&orderID=$zenOrderID&price=$zenPrice">Insert into Ledger DB</a>. You get the idea?
I think this would be a pretty slick little system and I just need a little help figuring out where I can get what I need from the code. Thanks guys! :-)