Posted on 4 Comments

Mass import products to Magento multi-store setup

Magento Logo

So, you are about to import a large amount of products into Magento. Well, there are a couple of different approaches available. First, you could use the ancient Data Flow import based on specific profiles. Then, you could use the improved Data Import version, which still is (very) resource consuming. Lastly, there is magmi – a highly efficient tool to mass import data to Magento, which is the preferred way to go in almost all cases when dealing with larger sets of product data in Magento. This post shows how to mass import products to Magento multi-store setups using magmi.

Export products

First, you need to export existing products as a CSV file. This can be achieved (again) using Data Flow, Data Import or a more elaborate database dump. Let’s assume at this point that you have a CSV file ready (very convenient, I know). In case you don’t, simply run the built-in Data Export funtion from within the admin backend (specify only those columns you definitely need to keep the processing to a minimum) or use the default Export All Products Data Flow profile. Edit this CSV to your needs so that you have a working set of products to be imported afterwards. Make sure at this point to retain the required columns so that you don’t run into problems afterwards. The columns required for the import process depend on the scenario at hand but rest assured you need at least sku, store and any additional attribute such as name or description.

Export data manipulation tools

Make sure to edit your CSV file with a tool that is capable of handling UTF-8 correctly and also supports setting proper delimiters. LibreOffice is a very handy solution to do this. You can easily use the Save as functionality to set proper delimiters for magmi to import your edited CSV afterwards. Use comma (,) and as column separators, which is the default setting. Here is a working sample CSV extract with the respective required columns in the first row:

"sku","description","short_description","name","store"
"sample-1","My shiny product for Englisch store","Shiny product","Product A EN","en"
"sample-1","My shiny product for German store","Shiny product","Product A DE","de"

CSV import schema

In order to mass import products for particular store views in a multi store setup make sure that the store column is set correctly with the store view code. Have a look at core_store table or at the admin backend under System / Manage Stores to determine to correct store view code.

Note: The regular Data Import interface provided by Magento will activate the “Use default” setting on various attributes of the imported/updated products, thus potentially doing something you are not intending with importing/updating products! Instead, use magmi and the store column to explicitely set set which products to import into which store view.

Note that you can also specify a list of store codes for the store column. The fastest and (imho) safest way to mass import products to Magento is Magmi – the Magento Mass Importer. Next, we are going to setup magmi and set up a profile to mass import products.

Setup Magmi

First, download and install magmi and protect it from outside access (e.g. via .htaccess). Note that by default, the web interface will be accessible by everyone who knows the corresponding URL! Open the web interface: http://www.your-domain/magmi/web/magmi.php and

  1. Edit the global settings
  2. add and edit the import profile

Edit global configuration

Set your connection details and Magento version at hand: MAGMI Global configuration

Create an import profile

Next, setup the import profile based on the Default profile and specify CSV as data source: MAGMI Profile configuration

Make sure to enable the Magmi Optimizer as this will speed up the process significantly, especially when dealing with thousands of entries.

Run import

Finally, choose your CSV import file and set the import mode. You can choose between three different modes:

  1. Update existing items only, skip new ones
  2. Create new items, update existing ones
  3. create new items, skip existing ones

Again, for multi-store setups make sure that the store column contains the correct store code view code. The import process should run pretty fast using magmi.

Reindex data

Optionally, you can choose to kick off the reindexing process using magmi (enable the option Magento Magmi Reindexer), run the indexer with the shell script provided by Magento or use the corresponding admin backend option.

4 thoughts on “Mass import products to Magento multi-store setup

  1. […] and can take a while to execute for larger junks of data. Although there exist alternative ways to import/export data in Magento sometimes existing data flow profiles can’t be replaced just yet. Below you find a shell […]

  2. Thanks! I was missing the the correct store code for importing.

  3. Is it possible to import specific data to items without having to use every store view? For example, we have 5 store views and want to only edit descriptions/pricing for one store location. But from our understanding we have to export all store views and then pick only the descriptions we want to edit and then upload. Can we only export or import for a specific store view?

  4. How can i import images using by magmi for my multi store Magento? As a single store its working fine, after added additional store, magmi image not working. csv screen shot : https://snag.gy/Ju6MbK.jpg if i did any error, pls let me and demo CSV sheet.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.