From the Importing Products in Magento using CSV Files post, some examples of how to import simple products, product images and assigning product categories were given. We’ll now take a look at the process involving importing configurable products, custom options and more in Magento.
Before attempting to import products using the
System -> Import/Export -> Import area in the Magento admin, it is always worth exporting product data beforehand. This is so you can view the column names and see how product data is mapped in the CSV file.
If you’ve got an existing configurable product saved in the Magento admin, export the product and view the data within the CSV file. You’ll notice a couple of things.
Firstly, the configurable product’s data will appear in a row above its associated simple products in the CSV file. When importing products into Magento, the configurable product’s data needs to below the associated simple products. This is because of the second thing you’ll notice.
There are four columns associated with configurable products and their associated simples in the CSV. These are
For the configurable product,
_super_products_sku column contains the SKU of an associated simple product on each row.
If the configurable product’s data is above the associated simple’s in the CSV, Magento won’t be able to associate the simple SKUs to the configurable because the SKU of the simple products have not been imported into Magento yet, and therefore do not exist.
An example CSV import file that will successfully import a configurable product with associated simple products can be seen below.
This uses the
color attribute is represented by the
_super_attribute_code column. So assuming that this attribute exists in your Magento admin, you won’t encounter any errors when importing the example CSV file.
To import custom product options that reside in the
Custom Options tab when creating or editing a product, first take a look at the screenshots below representing three products with their custom options.
These products were created in the Magento admin manually. When exporting the product data from Magento, the CSV file can be seen by clicking on the link below.
Unlike the configurable product CSV file, you do not have to move around data within the file to successfully re-import tier prices into Magento. Therefore the example file above should seamlessly import into the Magento admin within
System -> Import/Export -> Import and associate custom options with their products correctly.
To show an example of importing products with tier prices, take a look at the screenshot below. This represents a simple product with a couple of tier prices set up.
Here you can see that the default price of the product is
For customers assigned to the
General customer group, with a group ID of
1, if the customer purchases one or more of the product, the price becomes
Similarly, for customers assigned to the
Wholesale customer group, with a group ID of
2, if the customer purchases one or more of the product, the price becomes
Again, unlike the configurable product CSV file, you do not have to move around data within the file to successfully re-import tier prices into Magento. An export of the tier prices should seamlessly import back into the admin.
An example import CSV file can be seen below.
The customer groups are represented by their ID in the
_tier_price_customer_group column. Therefore, ensure that you check the right ID corresponds to the correct customer group and you should have no problem importing tier prices.
Mastering the import and export process can take some time, especially with very little documentation on how you should go about constructing the CSV file on the web.
As with any import process, it is recommended that you export data first to view the contents of the CSV file before importing. This is particularly important if you do not know what the column header names should be, or if you’re looking to import custom product data created by third party extensions.
Following some of the steps above should save you a good amount of time when going about your own imports.
Note: This article is based on Magento Community/Open Source version 1.9.