Search code examples
phpcodeignitere-commercefile-typeorders

E-commerce which file type to use to format orders


I'm wondering which is the best practice to format into a file the received orders?

For now i'm using PDF but i would like to know if is out of there a lighter and more usefull file type.

thanks


Solution

  • Depends on what you want to do with those files...

    • If it's just some kind of report and you want to print, eMail or just archive it and keep the design, PDF seems the right choice
    • If you just need the pure data and want to run calculations, collect statistics, etc. and you need to keep it flexible in terms of changes/additions, you should export into something like XLS (Excel)
    • If you just need to display the data on demand or you just want to aggregate some key data for a quick overview, you can just keep it in the database and just call a php-script on demand
    • If you need all of this, maybe it would be a good idea to just save the data as CSV and then process it for whatever purpose in any application.

    I hope this answers your question in some way.