This document describes how to import database into Magento.  There are two majors database needing to import:"Customers" and "Products". However, in Products, there are two sub-databese needing to import as well.

a: import complete products with image gallry.

b: improt complete productc with categories

Morevoer, the following data we can export or import:

1. Customer data

2. Product stock data

3. Product data(all attributes relating to products)

There are two types of files that can be used for import and export

1. Excel spreadsheet

2. CSV

 

1. How to import customers into Magento

1.1 In order to import complete customer data, first, you should create a standard formatting CSV file including all customers` information, name of the file must be"Customers.csv". Then you need to login Magento backend as an Administrator

1.2 Once you have successfully login, you will see the page of backend like this:

1.3 Next goto System->Import/Export->Profiles

1.4 I n the Profiles level, you will see the main control panel interface as following. The Magento has several default Profiles, you can use them to edit or you can create new one. Click on the Add New Profiles on the right top of the Panel

1.5 T hen you will see the following page that create the new profile and begin to import csv file

1.6 I t is important for you to provide the uniquely request Name, and select Entity type and Direction. Notice: because the section 1 instruction is guiding you import customer into Magento, you need to select Entity type as Customer and Direction as Import!

1.7 O nce you have select,you must save your setting by click on Save and Continue Editing. Then on the left side of page more conrol button will come up. As following shows:

1.8 T hen you need to upload your file by click on Upload file button, the new page will come up as following shows. In this page Magento will ask you to Browse your file from your loacl computer disk

1.9 B y click the Browse button, and address your csv file in your computer. Then cilck Open button for uploading

1.10 O nce you have done this step, remember save your setting by clicking on Save and Continue Editing. Next you need to Run Profile. Click on Run Profile and you will see the next page come up on the right hand of the page. Then select a file which is uplaoded by you.

1.11 N ext click on Run Profile In Popup button run the profile in Magento

1.12 A new pop-page will come up and it will spent a few minutes for processing.

 

1.13 W ait until the processing goes to 100%. The message will come up show Finished profile execution. Then you can close this page and save profile. Once you have successfully save the profile, it will jump to home page of Profiles and you will see the Notice that Profile was successfully saved

1.14 T hen you can check that the new import file was in the table list and you can use this file in Magento

 

 

2. How to import Products into Magento

2.1 How to import complete products with images galley

2.1.1 I n order to import the complete product with image gallery, you need to create a CSV file, and in this CSV file, add a column named “galley” and other column should be the SKU id for the product. However, under the “galley” field, enter image file name preceded by “/”. You can also enter multiple file names separated by “;” such as:

2.1.2 N ext you need to put all the images in the “media\import” directory of the magento server. And the module will automatically import the images from the directory to the relevant directory.

2.1.3 N ext you can login to Magento backend and go to: System -> Import/Export -> Advanced Profiles

 

2.1.4 In order to import complete product data as well as categories you will first have to create an advanced import/export profile. Click on Add New Profile button. In the Profile Name text area enters the “Product Images” while in the 'Actions XML' text area enters the following XML:

 

 

<action type="dataflow/convert_adapter_io" method="load">

<var name="type">file</var>

<var name="path">var/import</var>

<var name="filename"><![CDATA[ProductImages.csv]]></var>

<var name="format"><![CDATA[csv]]></var>

</action>

<action type="dataflow/convert_parser_csv" method="parse">

<var name="delimiter"><![CDATA[,]]></var>

<var name="enclose"><![CDATA["]]></var>

<var name="fieldnames">true</var>

<var name="store"><![CDATA[0]]></var>

<var name="number_of_records">1</var>

<var name="decimal_separator"><![CDATA[.]]></var>

<var name="adapter">catalog/convert_adapter_Productimages</var>

<var name="method">parse</var>

</action>  

                   And save

 

2.1.5 T hen Click on the left control button Run Profile and Run Profile In Popup

2.1.6 A new pop-page will come up and it will spent a few minutes for processing

2.1.7 Wait until the processing goes to 100%. The message will come up show Finished profile execution. Then you can close this page and save profile. Once you have successfully saved the profile, it will jump to home page of Profiles and you will see the Notice that Profile was successfully saved.

 

2.2 How to import complete products with categories

2.2.1 I n order to import complete product data as well as categories you will first have to create a standard CSV file for product import and name of the file must be “CustomProductFields.CSV “. Change the name of the field “category_ids” to “categories”. Under the “categories” column enter the name of categories like:

which means Category tree structure will be created like:

2.2.2 N ext you need to log in the Magento backend and go to: System -> Import/Export -> Advanced Profiles

 

 

2.2.3 In order to import complete product data as well as categories you will first have to create an advanced import/export profile. Click on Add New Profile. In the Profile Name text area enters the “CategoriesProduct” while in the 'Actions XML' text area enters the following XML:

 

 

<action type="dataflow/convert_adapter_io" method="load">

<var name="type">file</var>

<var name="path">var/import</var>

<var name="filename"><![CDATA[CategoriesProducts.csv]]></var>

<var name="format"><![CDATA[csv]]></var>

</action>

<action type="dataflow/convert_parser_csv" method="parse">

<var name="delimiter"><![CDATA[,]]></var>

<var name="enclose"><![CDATA["]]></var>

<var name="fieldnames">true</var>

<var name="store"><![CDATA[0]]></var>

<var name="number_of_records">1</var>

<var name="decimal_separator"><![CDATA[.]]></var>

<var name="adapter">catalog/convert_adapter_products</var>

<var name="method">parse</var>

</action>

            And save.

2.2.4 T hen Click on the left control button Run Profile and Run Profile In Popup

 

 

2.2.5 A new pop-page will come up and it will spent a few minutes for processing

 

2.2.6 Wait until the processing goes to 100%. The message will come up show Finished profile execution. Then you can close this page and save profile.O nce you have successfully saved the profile, it will jump to home page of Profiles and you will see the Notice that Profile was successfully saved.

 

 

 

A fter you finish all importing, you can check in Magento Server

 

 

 

Common Issues with importing/exporting:

 

 

 

1.       the directories should are writeable

2.       images location:

We need to ensure that if we import images with your products, and then are placed in the path: /media/import. Otherwise, they will throw errors and will not be imported.

Tips: if the value of our image column is /sub/image.jpg, then the image should be placed in:media/import/sub/image.jpg

3.       bad CSV file formatting

often the cause of a bad import and missing rows from the import, is that of bad file formatting

4.       the value of the PHP max_execution_time is too small, the script timeouts on certain web hosting

POSTED DATE:    Aug 21, 2011      TAGS: