MagePlugins

The Best Extensions Backed By The Best Support Team

Overview

The “Advanced Dataflow” extension is a set of additional adapters and parsers to increase the Magento Dataflow flexibility. As you may know, Magento migration processes are introduced with profiles. Each profile is a combination of actions (adapters / parsers / mappers) to transfer data from one format into another. The adapters and parsers variety makes the migration process flexible. Magento enables customers and products (with or without an inventory) to be exported / imported using CSV or Excel XML formats. The “Advanced Dataflow” extends default bounds to cover more needs. The most essential “Advanced Dataflow” feature is the order import and export. It appends orders to list of available entities to migrate.

Read more about Dataflow HERE

Magento Dataflow is a data exchange framework that can be used by both merchants and developers. The basic Dataflow tool includes preconfigured profiles that make it easy to import and export product and customer data. The profiles can be used as they are, or be modified to meet your needs. You can create additional profiles for operations that are performed on a regular basis. For more sophisticated applications, Advanced Profiles can be defined in XML to perform custom data exchange operations.

The following instructions show how to use Dataflow profiles to export all product data, and import new product images.

Step 1: Export All Products

  1. Before you begin, make sure that all changes to the product data have been saved.

  2. On the Admin menu, select System > Import/Export > Dataflow - Profiles.

  3. In the list of profiles, select Export All Products.

  4. In the panel on the left, click Run Profile. Run Profile

  5. To begin the process, click the Run Profile in Popup button. Run Profile in Popup

  6. Wait a few moments for the profile to begin execution. The length of time it takes to complete the process depends on the size of the database. Do not close the window. Profile Execution

  7. When the process is complete,you can find the exported CSV file in the following location on the server:

    [magento-install-dir]/var/export/export_all_products.csv
                                

Here’s how the exported data file looks from the command line of the server:

  1. Use an SFTP utility to download the export_all_products.csv file from the server to your desktop. Downloaded File
  2. Then, open the file in any editor that supports UTF-8 encoding, such as Notepad++ or OpenOffice Calc. To open the CSV file in OpenOffice Calc, specify a comma as the separator, and double quotes as the text delimiter.

export-csv-open-office-comma_thumb_0_0.png

The CSV data appears in the spreadsheet as rows of product records organized into columns of attributes, with the Attribute Code in the header of each column.

Step 2: Copy the Product Images to the Server

The CSV file contains a path to each product image, but the actual image files must be uploaded to the server. To make the images available to import, place them in the media/import directory.

[magento-install-dir]/media/import
                            

Use your SFTP utility to copy the product images that you want to import to the media/import folder.

dataflow-import-images-sftp_thumb_0_0.png

Step 3: Edit the CSV File

  1. Edit the data as needed.
  2. Save your changes to the CSV file.

For this example, we will add three new images to SKU #hdb005. Because this is the only product record that we’re going to update, the others can be deleted from the CSV file.

Currently, this product has only one image that is used for the base image, small image, and thumbnail. Because we’re going to now offer this product in three colors, we need to upload an image for each color, and replace the image that’s currently assigned to the product. Because this is a simple product, we can later use Custom Options to add an option for each color.

Magento creates a directory structure of product image files that is organized alphabetically. You can see that path before each image file name in the CSV data. However, when you import images, you must never include that path before the file name. The only thing you have to do is enter a forward slash before the file name of each image that you want to import. Magento takes care of the rest. For this example, we need to add the three image files that were uploaded to the media/import folder.

/hdb005_HOTP_600.jpg

                            /hdb005_MARM

                            /hdb005_SALM_600.jpg
                            

In the data, we will replace the original image file name, and add the other two image file references on separate blank lines. just below the original row. You must also enter the SKU on each additional line, to associate the images with the product.

dataflow-import-images-csv-data_thumb_0_0.png

Step 4: Import the Products

  1. On the Admin menu, select System > Import/Export > Dataflow - Profiles.
  2. In the list of profiles, select Import All Products.

This general-purpose profile can be used to import or update any number or product records.

dataflow-import-all-products_thumb_0_0.png

  1. In the panel on the left, select Upload File.

dataflow-import-upload-file_thumb_0_0.png

  1. Because we’re uploading only one file, click the Browse button for File 1. Then, find the file on your computer and click to select it. The path to the file appears in the input box.
  2. Click the Save and Continue Edit button.

dataflow-import-browse.png

  1. In the panel on the left, select Run Profile.
  2. Select the CSV file that you edited. If there are several files in the list, make sure to select the right one. Then, click the Run Profile in Popup button.

Run Profile

  1. Wait a few moments for the profile to begin the import process. Do not close the window or interrupt the process. Look for the “Finished Profile Execution” message at the bottom of the list when the import process is complete. If you receive an error message, correct the problem in the CSV file, and try again.

dataflow-import-complete.png

Step 5: Update the Index

Usually the index needs to be updated after changes are made to product data. If you receive a message that the indexes are out of date, click the link and update the index.

Profiles

In menu: System -> Import / Export -> Dataflow – Profiles

The profiles manager has the additional “Orders” entity type and 2 corresponding profiles to import and export orders.

Export Orders

The “Export Orders” profile wizard is similar to “Export Customers” and “Export Products” profiles but with their own filters based on shipping, billing, items or orders attributes itself. Select the “Run Profile” tab and push the “Run Profile in Popup” button. The output file should be like this.

Import Orders

Choose input method in “File Information” section and data format.

XML Data Format

XML, the commonly used data format, is integrated into the Dataflow. It's available in profile wizard additionally to CSV and Excel XML standart formats.

The next 3 parsers are implementing XML data format handling for 3 types of entities:

advanceddataflow/sales_convert_parser_order_xml – Orders
                        advanceddataflow/catalog_convert_parser_product_xml – Products
                        advanceddataflow/customer_convert_parser_customer_xml – Customers
                        

For example, the action to parse orders XML is:

<action type="advanceddataflow/sales_convert_parser_order_xml" method="parse">
                            <var name="adapter">advanceddataflow/sales_convert_adapter_order</var>
                            <var name="method">parse</var>
                        </action>
                        

XML samples:

Orders

Products

Customers

Order Adapter

Use the next action XML to load all orders for the specified store.

<action type="advanceddataflow/sales_convert_adapter_order" method="load">
                                <var name="store"><![CDATA[0]]></var>
                            </action>
                            

In most cases, you will need to filter orders to output. It may be done by filter variable defining. The full order filters list is:

Property Description
filter/increment_id to load with id starting with value
filter/real_order_id to load with real id starting with value
filter/coupon_code to load with coupon code starting with value
filter/status to load bystatus. Valid values are: canceled,closed, complete, fraud, holded, payment_review, pending, pending_payment, pending_paypal, processing
filter/shipping_method to load by shipping method code. Like tablerate_bestway, flatrate_flatrate, freeshipping_freeshipping, etc
filter/customer_group_id to load by customer group identifier
filter/customer_email to load with customer email containing value
filter/customer_firstname to load with customer first name starting with value
filter/customer_lastname to load with customer last name starting with value
filter/created_at/from to loadcreated after date specified
filter/created_at/to to loadcreated before date specified (including that date)
filter/updated_at/from to loadupdated after date specified
filter/updated_at/to to loadupdated before date specified (including that date)
filter/weight/from to load with weight starting from value
filter/weight/to to load with weight up to value
filter/total_item_count/from to load with items count starting from value
filter/total_item_count/to to load with items count up to value
filter/order_currency_code to load by currency code
filter/shipping_amount/from to load with shipping price starting from value
filter/shipping_amount/to to load with shipping price up to value
filter/tax_amount/from to load with tax starting from value
filter/tax_amount/to to load with tax up to value
filter/subtotal/from to load with subtotal starting from value
filter/subtotal/to to load with subtotal up to value
filter/grand_total/from to load with grand total starting from value
filter/grand_total/to to load with grand total up to value
filter/discount_amount/from to load with discount starting from value
filter/discount_amount/to to load with discount up to value
filter/subtotal_incl_tax/from to load with subtotal including tax starting from value
filter/subtotal_incl_tax/to to load with subtotal including tax up to value
filter/total_due/from to load with total due starting from value
filter/total_due/to to load with total due up to value
filter/shipping_address_email to load with shipping email containing value
filter/shipping_address_firstname to load with shipping first name starting with value
filter/shipping_address_lastname to load with shipping first name starting with value
filter/shipping_address_company to load with shipping company containing value
filter/shipping_address_city to load with shipping city containing value
filter/shipping_address_country_id to load by shipping country. All ISO2 countries codes are valid
filter/shipping_address_region to load with shipping region containing value
filter/shipping_address_postcode to load with shipping postal code / zip containing value
filter/shipping_address_telephone to load with shipping telephone starting with value
filter/billing_address_email to load with billing email containing value
filter/billing_address_firstname to load with billing first name starting with value
filter/billing_address_lastname to load with billing first name starting with value
filter/billing_address_company to load with billing company containing value
filter/billing_address_city to load with billing city containing value
filter/billing_address_country_id to load by billing country. All ISO-2 countries codes are valid
filter/billing_address_region to load with billing region containing value
filter/billing_address_postcode to load with billing postal code / zip containing value
filter/billing_address_telephone to load with billing telephone starting with value
filter/item_sku to load with item SKU starting with value
filter/item_name to load with item name starting with value
filter/item_qty_ordered/from to load with item quantity starting from value
filter/item_qty_ordered/to to load with item quantity up to value
filter/item_weight/from to load with item weight starting from value
filter/item_weight/to to load with item weight up to value
filter/item_row_weight/from to load with item total weight starting from value
filter/item_row_weight/to to load with item total weight up to value
filter/item_price/from to load with item price starting from value
filter/item_price/to to load with item price up to value
filter/item_tax_amount/from to load with item tax starting from value
filter/item_tax_amount/to to load with item tax up to value
filter/item_discount_amount/from to load with item discount starting from value
filter/item_discount_amount/to to load with item discount up to value
filter/item_row_total/from to load with item total starting from value
filter/item_row_total/to to load with item total up to value
filter/price_incl_tax/from to load with item price including tax starting from value
filter/price_incl_tax/to to load with item price including tax up to value
filter/row_total_incl_tax/from to load with total due starting from value
filter/row_total_incl_tax/to to load with total due up to value

All filters are reflected in the “Profile Wizard” tab for profile in “Export Filters” section once the “Orders” entity type selected to export. The best way to set up filters is to save the profile and copy the resulting XML from “Profile Action XML” tab.

The Best Extensions Backed By The Best Support Team