Knowledgebase

How to export order information in Magento

If you want to export information related to the orders placed from your Magento site, there are a couple of ways you can do that. An easy way to do this is to use the built-in feature for exporting order information. To do this, after you log in to the admin panel of your Magento go to Sales menu>Orders. On the page that opens there's a table with all the orders. The table lists the most basic information for each order: order ID, the store from which the products were ordered, the date the order was placed, the name associated with the billing and shipping address (the name of the customer), the price and the status of the order.

Above the table there's a drop-down menu labeled Export to and the drop-down itself is set to CSV. Leave the drop-down menu to CSV and click on the Export button that's next to it (you don't need to mark the checkboxes in front of the orders in the table before you click on the button). After you click on the button a window will pop out with which you can save the CSV (comma-separated values) file on your local computer. You can view the file with applications like Microsoft Excel and OpenOffice Spreadsheet. The file contains the order information for all orders. The information that's in the file is exactly the same as the information displayed in the table when you go to Sales>Orders in the Magento admin panel (e.g. order ID, customer's name, price, status, etc.).

You can also export order information into a CSV file by using phpMyAdmin. In this case you can choose the database tables from which you want to export information. With this method you can export much more detailed order information. You can access phpMyAdmin from the Databases section of the Pixie control panel; there's a phpMyAdmin link in the black area on the right. Inside phpMyAdmin find in the left frame the database in which your Magento is installed and click on its name. This will display the database tables in the right frame. The table that you need is called magento_sales_flat_order (magento should be replaced with the actual table prefix). If there are no other applications installed in the database, the table magento_sales_flat_order should be on the second page (you can change the pages using the drop-down menus that are above and below the tables).

Once you find the table mark the checkbox in front of it and from the With selected drop-down menu that's at the bottom of the page select Export. A new page will automatically open. On that page select CSV from the Format drop-down menu and for Export Method select Custom. When you do that a few more settings will appear. Scroll down to the bottom of the page, mark the checkbox for Put columns names in the first row, then click on the Go button and use the window that pops out to save the file on your local computer. If you don't put the column names in the first row it will be very difficult to know what the values in each column are for. You can view the CSV file with applications such as Microsoft Excel and OpenOffice.

Was this answer helpful?

 Print this Article

Also Read