Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Ver 3.05 Import/export Order Data Programatically Rate Topic   - - - - -

 
  • Wilko
  • Advanced Member
  • Members
  • Join Date: 14-Feb 13
  • 102 posts

Posted 06 October 2015 - 09:51 AM #1

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.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11406 posts

Posted 06 October 2015 - 08:05 PM #2

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Wilko
  • Advanced Member
  • Members
  • Join Date: 14-Feb 13
  • 102 posts

Posted 07 October 2015 - 08:10 AM #3

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


Edited by Wilko, 07 October 2015 - 08:28 AM.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11406 posts

Posted 07 October 2015 - 08:01 PM #4

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.)


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.