Ver 3.05 Import/export Order Data Programatically

Been a long time since I was in here...

Still using 3.05 as I am sole IT person and way too busy dealing with the "big picture" to risk all of the potential upgrade (to 4.x) woes...

I currently export order_data.csv and order_details.csv and use in local system I have thrown together to make life easier to produce output for specific business needs.

I am wondering if anyone has found a way to pull the two order export options programatically (via php curl for example) in the absence of an API for 3.05?

I could simply write a php script to do this on the server and call that - but I would rather not introduce anything into the mix server side that could open up a potential hole.

Any feedback is welcomed.

You could do some small interface work and then run the exports from cron-job to a server directory. You could then just fetch the files as you need them.

Otherwise, in V3, many of the import export functions are part of the exim controller itself. Hence you'd have to use php output buffering to perform the operations. Note that you will still probably need some kind of wrapper since to generate an export, you need to POST the parameters.

Hi tbirnseth,

Thank you - I'm tending to think my best way forward is just to write a small php script to pull the data direct from the database and lock it down as much as possible. I can restrict the IP access as only sites that would call it are static IPs anyway.

It's one-way traffic - only reading data from a number of tables so no chance of any interference with CS-Cart function that I can see...

I guess almost creating my own mini API

Thanks again

I would use the business layer (php functions) versus the database layer to get the data you need. This is because you probably want data after business rules have been applied (discounts, group restrictions, discount pricing, etc.)