The Basics of Importing & Exporting in Magento
Importing / Exporting functionality is available in both CE and EE for both product and customer data. There are 2 different ways to do this which require different csv configuration. There are many nuisances with exporting / importing in Magento, so the below is to act only as a guide.
Note: Importing supports all product types except bundle, gift carts, and downloadable products. All product types can be exported, expect for Gift Cards.
Basics of Exporting
To familiarise yourself with the csv format required for each, the best thing to do is to first perform an export to you can see how the data and headings of the CSV will need to be organised.
We typically recommend the 'New Import' functionality, which can be performed via System > Import / Export. There may be instances with multi website / store / storeview installations that the data in the multi-row format of the 'new import' becomes difficult to manage, so in those instances the Dataflow Profiles option may be preferable.
Depending on whether you export from the Import / Export or the Dataflow Profiles (both found under the System > Import / Export menu options) option the export data will be organised slightly differently, so you need to make sure the differences are noted and the CSV format is organised appropriately for each option.
How to Export using the 'New Export' functionality
1. Navigate to System > Import/Export > Export
2. Select the appropriate Entity Type from the dropdown (either Products or Customers), and select CSV from the Export File Format (this is highly recommended).
3. From the grid, use the Skip tickboxes to select all the fields that you DO NOT want included on your export.
4. Once happy, click Continue (at the bottom of the grid).
5. You should then see a file download. Save it to a location that is easily accessible, and open using your preferred spreadsheet editing program (Microsoft Excel, Open Office, etc).
Basics of CSV Management
A CSV is a simple file format used to store tabular data, such as a spreadsheet or database. CSV stands for 'comma separated values', so for the purposes of a Product / Customer export or import, it is a spreadsheet organised where each tab represents a different piece of data (be it price, weight, sku, category assignment, etc).
Once you have performed your export, it is important to keep your data organised so that it appropriately reflects the data in your store currently, and so that (if need be) new data can be imported successfully.
The above is an example of the CSV file format of a 'new import / export' option.
In all cases, the headings of the columns will represent all the different customer / product data stored. One reason (of many) to perform an export before importing is to get the appropriate headings (when importing, headings need to be an exact match).
Following the same format, products can be added, and assignment of attributes changed.
When re-saving the csv, it is important to always ensure it is saved as a TEXT CSV (.csv) format, all text cells are encapsulated with quotes (i.e.Text Delimiter is: ") and the field delimiter is set to commas. It is also recommended that the character set is set to UTF-8 (where possible).
Basics of Importing
1. Navigate to System > Import / Export > Imports.
2. Select the appropriate Entity Type from the dropdown (either Products or Customers), and select the Import Behaviour to one of the following:
- Append Complex Data: This option will append (or add) any additionally listed data to the products complex entities (e.g. if you list a related product against a SKU it will add it the related products already assigned). *This is the safetiest option.
- Replace Complex Data: This option will replace the products complex entities data with whatever is on the CSV (using this option you need to include ALL complex data for the product, even if not being updated, to ensure attribute assignment is not wiped within the product).
- Delete Entities: This option will delete all product data that is depicted on the CSV (e.g. if you list a SKU and related products, if those related products are assigned to the mentioned SKU, all will be unassigned against the product).
*Complex Entities include: Categories & Website assignment, Images, Related Products, Cross Sells, Up Sells, Associated SKUs, and Tier Pricing.
3. Using the Choose File button, select your import file, and click Check Data.
4. You will then see a message saying that there are no issues and your file is ready to be imported OR corresponding row numbers will be reported with issues detailed to be first resolved before attempting to re-import).
5. If no issues, click Import.