Other Applications
How to import products in Magento using CSV files?

How to import products in Magento using CSV files?

It is rather inconvenient to manually add a large number of products at once to a Magento installation. Inserting products one by one will take a long time especially when you have hundreds or thousands of products. In such cases, you need an automatic way to add all those products to your Magento online store. We will address all the steps you need to take in order to achieve a successful import.

Access your Magento administrator backend and go to Catalog > Categories. Create all product categories you will need. When you are ready filling the form with all the information you like, click on Save Category.

Bear in mind that at this point you should make note of the newly created category IDs. It would be best to save them in a simple text file as you will need them for the import. The category ID will be displayed upon saving the category.

If you plan to have additional attributes for the products you are importing you will need to create those via Stores menu > Product under the Attributes section. You can use this functionality to add all custom attributes that are not present by default in a standard Magento installation. Note also that you can add additional attributes later at the moment you are creating a sample product. It is up to you whether to create the attributes before that or at the point you are creating the first product.

The next step is to manually add a product to your Magento installation. You will later export this product and use it as a template for importing the large batch. Make sure you include all the attributes you will use for the products you are going to import in the sample product.

Once you create the new product and save it it will appear in the products list for your Magento store.

You are now ready to make the sample export that you will use as a template. In the Magento administrator area go to System menu > Data transfer section > Export. This would redirect you to a new page where you should select Products from Entity Type Drop-down and CSV from Export File Format.

Now you should exclude the unnecessary attributes from the list by selecting them and then click on Continue from the bottom of the page. This will save a new file on your computer with a name similar to catalog_product_YYYYMMDD_randomnumber.csv . The file will include columns for each of the attributes you have defined for your products. Open it in a spreadsheet program (MS Excel, Open Office Spreadsheet) and add the products you would like to import. Make sure you are copy/pasting the corresponding attributes in the correct columns. Also here is when you will have to add the category IDs. Use the IDs from the text file you saved earlier and put the corresponding category ID for the products you are adding.

Once you have accomplished the above go back to the Magento administrator area and go to System menu > Data transfer section > Import. Now select Products from the Entity Type drop-down. After that, select Products from Entity Drop-down, and Add/Update from Import Behaviour drop-down. Now upload the CSV file by clicking on Browse next to Select File to Import.  If you have added images, you should also specify the path on the server where you uploaded them. Add the corresponding path to the Images File Directory section.

When ready click on Check data. If there are no issues or error with the import, a File is valid! message and Import button would appear. To initiate the process click on Import. When the import completes you will get the Import successfully done message.

Share This Article