Home » Magento tutorial for developer » 2 methods to CSV import configurable products in Magento

2 methods to CSV import configurable products in Magento

In this Magento tutorial, you will go through 2 common methods to bulk import configurable products in Magento, the 1st method (using Mgami) is more popular and it’s been used by lots of Magento users

magento CSV Import configurable product

Method 1

1. Using free extension AMartinez_CustomImportExport


or you can also use

2. Using free plugin Mgami for bulk importing configurable products

Download Mgami


Install and use Mgami

Full installation and user-guide for Mgami can be found here


Method 2

This is a a guide to import configurable products + categories written by Amartinez from Magentocommerce forum, I summarize his tutorials into this post

First off, download the script files here

Step 1:

Create a new advanced profile

1.1) (System→Import/Export→Advanced Profiles) → Add New Profile

1.2) You can use “Productimport” as Profile Name

1.3) Insert the following text as Actions XML

1.4) Change “name_of_my_import_file.csv” string with the name of your CSV file (eg. products.csv)

1.5) Click on Save Profile button and, when the advanced profile list is displayed, take note of the new profile ID (it should be 7 if no profiles were created before)

Step 2

Upload “Productimport.php” file to /var/www/magento/app/code/local/Mage/Catalog/Model/Convert/Adapter/ folder (you should create the folder)

2.1) Look for the following line:

in your copy of Productimport.php and change with the ID of your root category.

Step 3

Copy the “cron_import_products.php” file in the Magento root folder (eg /var/www/magento/) and make it executable (chmod +x cron_import_products.php)

3.1) Look for the following line:

in your copy of cron_import_products.php and change with the profile ID you have taken note at step 1.5)

Step 4

Add a cron job to execute the import script periodically, something like “00 0 * * * root /var/www/magento/cron_import_products.php”

Step 5

Prepare a products CSV file with the following columns:

Make sure, that the simple products are imported first (on top of the CSV file)!

Formats for specific fields

All of the following fields are to be set only for the configurable products in your file.

associated: SKUs of the simple products to associate with the given configurable product, comma-delimited (e.g. “999101149-4,999101149-6,999101149-8”).

config_attributes: Code of the configurable attributes belonging to the attributeset of the products to associate, comma-delimited (e.g. “Color,Size”).

categories: Categories of the given configurable product. Path of each categorie starting from one level above default category, “/” = pathdelimiter, paths comma-delimited, (e.g. “Brand/DELL,Type/Laptop,Type/Hardware”).

image, small_image, thumbnail: Name of the image to be used for this purpose. Image has to be uploaded to “/media/import” before import. Case-sensitive: jpg <> JPG! Please note leading slash! (e.g. “/999101149.jpg”)

gallery: Name of the images to be used as gallery images. Comma-delimited. Images have to be uploaded to “/media/import” before import. Case-sensitive: jpg <> JPG! Please note leading slash! (e.g. “/999101149(1).jpg,/999101149(2).jpg,/999101149(3).jpg”)

Step 6

If you want, prepare a customers CSV file with the following columns:

Step 7

When you want to update your Magento store, you need to upload your CSV files to /var/www/magento/var/import/ folder.

Step 8

Your image files must be in /var/www/magento/media/import folder.

Note: If you receive an Undefined property error when running, change the Productimport.php file as suggested by glandix2:



Update To import tier pricing at the same time, add a ‘tier_prices’ column to your csv, with prices like this: 50=31.99|100=22.99 and use the Productimport.php script included here

About Brian Wilson

Brian is a freelance Magento developer with 5 years of experience with customizing Magento extensions, magento themes. He's interested in sharing Magento Tutorials to the community


  1. avatar

    Magmi works for me, almost. It adds the simple and configurable products into Magento, but when I go to edit configurable product, I get errors. I would just like to add another good friendly paid module because it saved me hours. So, if anyone wants a solution that imports configurable and grouped products, try Store Manager: http://www.mag-manager.com/free-download

  2. avatar

    hi brian,

    i am following your second method. where do i find productimport.php

  3. avatar

    Hi Brian,

    First of all I would like to thanks for sharing your code with community and for your import configurable product blog.

    I am not able to find your Productimport.php file script. It would be great if you share this code with this blog.


  4. avatar

    Hi Brian,

    Your customization is great but i am not able to download your script because each download link redirect to the forum page. Can you please help me in this regard. I am not able to download any of your file.
    1- Productimport.php
    2- cron_import_products.php

    Can You please send me these script files on my email address?

    Ghulam Hussain

  5. avatar

    I tried the second method and everything is fine except the amount
    When I do the import of the items the quantity is always set to 0.
    In the csv file import there is a field “qty” and “is_in_stock”

    why is this happening?

    Thank you so much!


  6. avatar

    Brian, brilliant column you have transcribed! Can be defined as the most useful resource! As bulk importing of configurable products in Magento has always been quite important for eCommerce stores and other relevant websites. Options and steps shown on free Magento modules and plugins are really easy to understand and seem to be more helpful to Magento users and site admins.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top