MAGMI: Magento Mass Importer | News | PHPro
What's new in our world

MAGMI: Magento Mass Importer

09 December 2011

Magmi is an open-source project of Sebastien Bracquemont to import large quantities of products, based on CSV files, directly in the Magento database.
The benefits:

  • Super fast, direct SQL import.
  • Enhanced features (simple and advanced imported products)
  • Multiple storeviews and Websites possible
  • Import and update: categories, images, pricing, stock, .... (not bundled)
  • Translations of products at store level view

More information:

Installation and configuration:

The installation from Magmi is rather simple. Magmi is a standalone plugin completely beside your Magento installation. It interacts directly with your Magento database. I advise you to extract the Magmi folder in the root folder of your Magento installation. Create now the following folders in your Magento root folder:

  • /var/import (directory to import csv files)
  • /media/import (directory for the import of product images)

 Visit the magmi configuration page: http:// <magento-url> /magmi/web/magmi.php
Now you only have to make the database configuration of your Magento site in Magmi, fill out and save. All other parameters are standard to use if you have followed the above folder structure.

Magmi configuration

 First product import:

The item processors are very useful plugins to do an advanced import. Check this item processors for our first product import:

  • On the fly category creator / importer (allows for category titles instead of IDs to use)
  • Image processing attributes (corresponding import product images)

You can also check all plugins to avoid problems.

 CSV example:
demo-001;"Demo 1";12;19;1;4;demo.jpg;0;"demo categorie";2

 Demo file: phpro-simple-demo.csv

 If you save this csv file in the directory /var/import from magento and optionally post the image demo.jpg in the /media/import folder, you can select the csv file from the Data Sources tab of the Magmi imports page. Select the imported file from the dropdown, use ‘;’ as separator and " as enclosure. Go to the top of the 'Run magmi' tab and select "Create new items, new ones skip” and click Run.

Magmi plugin configuration detail

When the import is successful you get a summary of the statistics from your import. You will get a list of error messages, when there is an import problem.
Go to the Magento backend and check if your first product was added to Catalog > Manage Products.

To view your product in the frontend, you need to re-index magento: System > index management.

 This simple import is done with the minimum data required in magento. Just a list of parameters:

  • SKU (unique number of a product)
  • name (title of your product)
  • price (price of your product)
  • Qty (quantity of products in stock)
  • is_in_stock (0 for no or 1 for yes, 1 is necessary to visualize your product in the shop)
  • visibility (4 for visibility in catalog and search)
  • Image (url of the image which is placed in the /media/import directory)
  • weight (weight can be 0 if you do not use it in your shop)
  • categories (the name of the category, if it does not exist it is created by the "on the fly category creator" plugin "demo/demo” to import in a subcategory)
  • tax_class_id (2 for products with taxes or use a self-configured value)

 Advanced product imports:

This more advanced import allows you to use almost all parameters inside your Magento site.

 File: phpro-advanced-demo.csv

 Let's take a closer look to use some additional parameters:

  • store (default "admin" or a storeview to make translations possible. You can overwrite the title and description from "admin" at store level view).
  • websites (default "base" or the code of the Web site where you want to add the products, only to be used for a Magento installation with multiple sites)
  • attribute_set ('Default' or a self-generated code for a product with special attributes)
  • Type (default 'simple' or 'configurable' to import configurable products)
  • media_gallery (add extra images in addition to the standard picture)
  • See also the most common attribute codes within magento:

 Kind regards,