Search This Blog

Feb 16, 2011

Step by Step Advanced Profile Magento Exportation

To make a batch importation of products in magento e-commerce system specifically you need to follow certain steps to make the importation successful. The advantages of this process can be weight through the time you spent manually adding product  information in magento backend.  In addition making this importation process can save you money and time for the future used.


EXPORTING DATA


Pre-requisite: YOU WILL NEED FTP SOFTWARE LIKE FILEZILLA: http://downloads.sourceforge.net/filezilla/FileZilla_3.3.4.1_win32-setup.exe
You will also need Excel to view the exported file.

Step 1: Login to the Magento Admin

http://yourwebsite.com/index.php/admin


Step 2: Navigate to System -> Import / Export -> Advanced Profiles



Step 3: Since imports / exports can take a long time, a good strategy is to segment out the work into smaller chunks. So the goal here would be to copy one of the profiles to a new one.

Right click on the Edit link for "Export All Products + Custom Options [CSV] - TEMPLATE " and open it in a new window.

Go back to the first window and click on "Add New Profile".


Copy the fields from the template profile to your new profile.


Now give your Profile Name something meaningful -- it should be clear what you are attempting to export. Also THIS WILL HELP YOU REMEMBER WHAT THE PROFILE WAS USED FOR.
Copy the Actions XML as well.



Step 4. Review the Actions XML data

This is VERY IMPORTANT. This XML is simple to read and contains the rules for the export. Look at the code below and we will explain the highlighted areas. Leave the un-highlighted areas ALONE.
---------------------------------------------------------------------------------
<action method="load" type="catalog/convert_adapter_productimport">
<var name="store"></var>
<var name="filter/adressType"></var>
</action>
<action method="unparse" type="catalog/convert_parser_productexport">
<var name="store"></var>
<var name="entity_id_start"></var>
<var name="entity_id_end"></var>
<var name="type_ids"></var>
<var name="sku_pattern"></var>
<var name="attribute_set"></var>
<var name="date_created_start"></var>
<var name="date_created_end"></var>
</action>
<action method="map" type="dataflow/convert_mapper_column">
</action>
<action method="unparse" type="dataflow/convert_parser_csv">
<var name="delimiter"></var>
<var name="enclose"></var>
<var name="fieldnames">true</var>
</action>
<action method="save" type="dataflow/convert_adapter_io">
<var name="type">file</var>
<var name="path">var/exports</var>
<var name="filename"></var>
</action>
---------------------------------------------------------------------------------
Let's look at the first section:
<action method="unparse" type="catalog/convert_parser_productexport">
<var name="store"></var>
<var name="entity_id_start"></var>
<var name="entity_id_end"></var>
<var name="type_ids"></var>
<var name="sku_pattern"></var>
<var name="attribute_set"></var>
<var name="date_created_start"></var>
<var name="date_created_end"></var>
</action>


There are 8 different rules / filters that can be set for exporting:
Variable Rules for determining which set of products to export:


FILTER NAME
FILTER VALUE
store
DO NOT CHANGE THIS
entity_id_start
Product ID to start from

Example:
<![CDATA[15563]]>
entity_id_end
Product ID to end the export at

Example:
<![CDATA[15565]]>
type_ids
Either simple or configurable
YOU WILL WANT TO KEEP THIS TO "simple"

Example:
<![CDATA[simple]]>
sku_pattern
This can be a list of patterns of the sku (example below)

Example:
<![CDATA[table-picnic-rect,gazebo-360]]>
attribute_set
The attribute set being used

Example:
<![CDATA[Chair]]>
date_created_start
Start Date of the created products - export based on a date range

Example: Oct, 1 2010
<![CDATA[2010-10-01]]>
date_created_end
End Date of the created products

Example: Oct 5, 2010
<![CDATA[2010-10-05]]>

EXAMPLES

For each of the items below, you will want to adjust the information that lives in this tag:
<![CDATA[ ****MAKE YOUR CHANGES HERE ONLY *** ]]>
So if you wanted to export all simple products, starting at ID 15563 you would set the XML value to:
<action type="catalog/convert_parser_productexport" method="unparse">

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

<var name="entity_id_start"><![CDATA[15563]]></var>

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

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

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

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

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

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

</action>
If you wanted to start from the first product in the system :
<action type="catalog/convert_parser_productexport" method="unparse">

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

<var name="entity_id_start"><![CDATA[1]]></var>

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

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

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

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

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

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

</action>

If you wanted to export all gazebo products:
<action type="catalog/convert_parser_productexport" method="unparse">

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

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

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

<var name="type_ids"><![CDATA[simple]]></var>

<var name="sku_pattern"><![CDATA[gazebo]]></var>

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

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

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

</action>


If you wanted to export all gazebo-dream products:
<action type="catalog/convert_parser_productexport" method="unparse">

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

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

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

<var name="type_ids"><![CDATA[simple]]></var>

<var name="sku_pattern"><![CDATA[gazebo-dream]]></var>

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

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

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

</action>


If you wanted to export all products created in October 2010:
<action type="catalog/convert_parser_productexport" method="unparse">

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

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

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

<var name="type_ids"><![CDATA[simple]]></var>

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

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

<var name="date_created_start"><![CDATA[2010-10-01]]></var>

<var name="date_created_end"><![CDATA[2010-10-31]]></var>

</action>


You can get the product ID from the Catalog -> Manage Products Screen:


Example: Export only 1 product:
<action type="catalog/convert_parser_productexport" method="unparse">

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

<var name="entity_id_start"><![CDATA[15563]]></var>

<var name="entity_id_end"><![CDATA[15563]]></var>

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

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

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

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

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

</action>
The instructions above will limit the export to only 1 product.

Example: export all tables where the sku starts like table-picnic.
By looking at the Manage Products screen, I can see that there are 1241 simple products that start with the sku: "table-picnic". That is how many I would expect on the export.

XML would look like this:
<action type="catalog/convert_parser_productexport" method="unparse">

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

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

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

<var name="type_ids"><![CDATA[simple]]></var>

<var name="sku_pattern"><![CDATA[table-picnic]]></var>

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

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

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

</action>
Step 5:
Once you have your XML variables set, you will need to tell Magento WHERE TO STORE THE OUTPUT FILE:
<action type="dataflow/convert_adapter_io" method="save">
<var name="type">file</var>
<var name="path">var/exports</var>
<var name="filename"><![CDATA[export_products_tables_seating_20101105.csv]]></var>
</action>

IMPORTANT! - you will want to give your file a VERY descriptive name so that you know what's in it, especially if it is a certain set of products. You MAY want to give it a date of when it was generated.

Step 6:
Save your changes. Click "Save and Continue Edit" on the profile screen.

Step 7:
Click the "Run Profile" tab on the left. Then click "Run Profile in Popup" button.


Step 8:
The browser will run for a length of time. You will start to see some output after 10-15 seconds:


Step 9:
Pick up the exported file.
Startup the FTP client.
After you login click into files -> exports



Step 10:
REVIEW THE EXPORT FILE
You can now drag the file you created to your desktop for further processing. And for pricing.
Make sure that you exported the products that you wanted. The files are all .csv files and can be opened up in excel for viewing.


2 comments:

Unknown said...

Hi

I m new to the magento & i m using Magento CE1.7


I want export all products but in the csv file its not showing any where.


help me please


Thank you

Kishore said...

Hi,

Seems this is outdated, can you please test it in magento 1.7.0.2 and let me get working xml.

I really appreciate the effort so far, but I feel like whole effort is worthless.
catalog/convert_parser_producexport is not being recognized

Thanks
Kishore