Improved Import / Export Magento 2 Extension Manual

- Magento 2, Our extensions
 

Cron import Magento 2 , categories import Magento 2

Improved Import / Export extension for Magento 2 provides a possibility to import your csv files with products data and product images to Magento 2 from a remote FTP / SFTP server, Dropbox or a direct URL of a source CSV file as well as offers a dedicated categories import from CSV files, on the fly import of product attribute values, cron jobs import, etc. Besides, you get advanced export capabilities, including order export and export jobs with mapping and filters.

Complete features list of Improved Import/Export Magento 2 Extension features:

  1. Import csv files from a remote FTP / SFTP server, Dropbox or via a direct URL;
  2. Import product images from a remote FTP / SFTP server, Dropbox or via a direct URL;
  3. Dedicated category import from a CSV file for selected categories (by default M2 allows importing categories only together with assigned products);
  4. Creation of new product attributes on the fly during import process;
  5. Creation of new attribute values on the fly: if attribute values don’t exist in Magento 2 data base, they are created during the import process;
  6. Con jobs for any kind of import (products , categories, customers, stock,  attributes, etc.) – flexible and extremely powerful feature of Magento 2 Enterprise Edition is now available for Community Edition!
  7. Full support for configurable products: files can be placed locally or imported from a remote URL source;
  8. Fields mapping (in Magento 1.x style!) – you can map Magento 2 product attributes to any custom CSV column in your file! Fully flexible and powerful way to import custom data structures to Magento!
  9. Support for XML & TXT file formats;
  10. Export jobs with mapping functionality;
  11. Run import / export jobs from admin;
  12. Extended debugging functionality;
  13. Order export with invoices, credit memos, and other docs;
  14. Magento 1 preset for import jobs;
  15. Hardcoded / default values during mapping;
  16. File validation
  17. Inline Edit Mode for cron in a grid; 
  18. Attributes based export filtering
  19. Sample files in the extension pack and manual;
  20. Direct CSV upload;
  21. Unzip / untar archives automatically;
  22. History with logs.

Improved Import Export Magento 2 Roadmap – vote for the most exciting features and we will implement them first. Leave your suggestions in the comments and we will add them to the poll.

Buy Improved Import Magento 2 Extension

Improved Import Magento 1 Extension

Firebear Import Export Extension FAQ

We provide professional installation services for our Magento 2 extensions – get your extension installed and configured right after the purchase!

  1. Installation
  2. Standard Magento 2 import
  3. Extension Configuration
  4. Import
    1. Import Jobs
    2. Add New Import Job
      1. General Settings (Cron Schedule)
      2. Import Settings
      3. Import Behavior
      4. Import Source
      5. Map Attributes
      6. Manual Run
    3. Job History
  5. Export
    1. Export Jobs
    2. Add New Export Job
      1. General Settings (Cron Schedule)
      2. Export Settings
      3. Export Behavior (CSV, XML, TXT Export)
      4. Export Source
      5. Map Attributes (Mapping & Hardcoded Values)
      6. Filters
  6. Run Import/Export Jobs Via CLI
  7. Specific Features & Use Cases
    1. Categories import
    2. Product attribute values on the fly import
    3. Product attributes import – creation of new attributes on the fly during the product import
    4. Import downloadable products
    5. CSV File samples
  8. Upcoming Features

Before we begin, check a brief illustration of the extension features:

Installation

1. Backup your web directory and Magento 2 store database;

2. Download Improved Import installation package;

3. Copy files to /app/code/Firebear/ImportExport/ folder (create it if not exist!)

4. Navigate to your store root folder in the SSH console of your server:

cd path_to_the_store_root_folder

run:

Only if you want to use Dropbox features :

then:

and:

5. Flush store cache; log out from the backend and log in again.

Standard Magento 2 import

Before going any further with Improved Import, make sure you have read manuals and understand what to do with the default Magento 2 import procedure!

Extension Configuration

Magento admin -> Stores -> Settings -> Configuration -> Firebear Studio -> Import / Export

Stores Configuration

There is only one option in the configuration section – ‘Create attribute values on the fly’. Set to ‘Yes’ to create attribute values during import automatically. To create new attributes, you should use custom column name structure (for more information see the following manual).

Import

The following part of the manual is dedicated to import features of our extension.

Import Jobs

All import jobs are gathered in a grid under System -> Improve Import / Export -> Import Jobs. The grid displays the following information about each job:

  • ID – this column shows job ID;
  • Title – job title is displayed here;
  • Status – a job can be enabled or disabled; this information is shown in the ‘Status’ column;
  • Cron – the Cron column illustrates the cron schedule you specified in the job settings;
  • Frequency – it is possible to set a custom or predefined frequency of jobs; the appropriate information is shown in this column;
  • Entity Type – an entity that is imported by the job;
  • Import Source – a source an import file is moved from.

In the ‘Action’ column, you can edit/delete jobs as well as change their statuses.

Alternatively, you can apply these actions to multiple jobs simultaneously.

Also note that it is possible to change crone schedule right in the grid:


Add New Import Job

Now, let’s add a new job, illustrating the new import functionality of Improved Import/Export. Once you hit the big orange ‘Add New Job’ button, you will be transferred to a new screen, which is divided into 4 sections: General Settings, Import Settings, Import Behavior, and Import Source. Let’s describe each one.


General Settings (Cron Schedule)

Here, you can enable/disable the job. Depending on the selected option, the job status is changed from ‘Enabled’ to ‘Disabled’ or vice versa.

Then, type a job title. We recommend you to use an expressive title that describes your new job. This will help you find the job in the grid or understand what jobs are enabled/disabled.

Now, it is necessary to configure the frequency of your import job. Although, you can always create a custom schedule (select the ‘Custom’ option in the ‘Frequency’ field), it is recommended to use the ‘Cron Schedule’ field (the field where you create a custom schedule) only if you understand cron well and have some previous experience in configuring this setting.

Alternatively, it is possible to select one of the predefined schedules:

  • None (manual run only)
  • Every minute;
  • Every hour;
  • Every day at 3:00am;
  • Every Monday at 3:00am;
  • Every 1st day of month at 3:00am.

The first section of the import job configuration page is now complete. You know how to change job statuses and create cron schedules. The following gif illustrates the aforementioned processes:

A custom format of a cron job can be configured with the help of the standard cron syntax:

Cron syntax

More information about cron configuration:

    1. https://en.wikipedia.org/wiki/Cron
    2. http://crontab-generator.org/
    3. http://www.cronmaker.com/
    4. http://stackoverflow.com/questions/18919151/crontab-day-of-the-week-syntax
    5. http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html
    6. https://firebearstudio.com/blog/magento-2-cron-configuration.html

Double check the configuration before saving the job.

Import Settings

Now, it is necessary to proceed to the second section of the configuration page – Import Settings. Here, you can only select an entity that will be imported. Currently, the extension allows you to import the following entities:

  • Products;
  • Categories;
  • Customers and Addresses (single file);
  • Customers Main File;
  • Customer Addresses;
  • Advanced Pricing.

Let’s select ‘Products’ to illustrate other sections.


Import Behavior

In this section, you are to specify import behavior. There are three default values: Add/Update, Replace, and Delete. Choose one that suits your needs. Next, configure validation strategy (‘Stop on Error’ or ‘Skip error entries’) and specify allowed error quantity to halt import process. It is also necessary to choose various separators:

  • Field Separator;
  • Multiple value separator;
  • Category Levels separated by;
  • Categories separated by.


Import Source

Import Source illustrates lots of useful improvements in comparison with the default import procedure. You can select one of three file types (the default import allows just one): CSV, XML, and TXT. Note that you can use XML files of the following format: Magento 2 Import Export Sample XML Files. Alternatively, you can upload any other format, but it is necessary to use mapping. Fore more up-to-date examples of import/export files in all formats, follow this link: Import Export Sample Files for Magento 2.

Next, choose your import source. It may be File, FTP, SFTP, URL, or Dropbox.

In case of ‘File’, you can use direct file upload or specify its path. In addition, it is necessary to type a path to a directory with images.

Dropbox upload requires the following parameters to be specified: File Path, App Key, App Secret, and Access Token.

To get the aforementioned parameters, follow this link: Dropbox API Application

Dropbox API Application

For ‘FTP’ and ‘SFTP’, specify File Path, Host, Port, Username, and Password.

As for ‘URL’ upload, it is only necessary to type a file URL in the appropriate field.

Note that for each upload type, the Improved Import / Export Magento 2 extension provides file validation (a big grey button below on the left).

This was a basic import job configuration. Now, you can click ‘Save & Run’ to test the newly created job. If the uploaded file has a structure that differs from the default import file, apply mapping. If it satisfies the Magento 2 requirements, start import process right now.


Map Attributes

However, if the import file has a custom structure that doesn’t fit the Magento 2 requirements, you can apply mapping. Check the examples of all import files here: Import Export Sample Files for Magento 2. The ‘Map Attributes’ section provides the ability to apply presets. There is a ‘Select A Platform’ field, in which you can select a platform to import a CSV file from. Let’s select Magento 1. The extension will provide links to sample files, so you can view the structure of each one.

Now, click the “Load Map Attributes” button to automatically map attributes. The module will compare system and import attributes, applying a mapping preset.

Once the preset is applied, the extension will automatically perform mapping for fields that don’t satisfy system requirements:

At the same time, you can still do everything manually: select a default Magento 2 attribute in ‘System Attribute’ and specify an appropriate import attribute. Besides, you can type a default (hardcoded) value for each attribute. It will be added to each imported item in the appropriate attribute column.

To delete a mapping item, click on a black bin icon. When mapping configuration is prepared, to validate mapping – hit the appropriate button in the section.

Now, you can save and run the new Import job or just save it. The appropriate buttons are available on the top of the screen:

To run the job from the Magento 2 admin (previously, this was possible only via CLI), choose ‘Save & Run’.

When the import is complete, the system will inform you whether the running went successfully or not. The detailed history log is also available on the appropriate page. In case of unsuccessful import, you will also see a detailed log with errors that are to be fixed:


Job History

Another important aspect of the Improved Import / Export Magento 2 extension is a job history which is available for both import and export. You can find it on each job screen. Open the job and click the ‘View History’ link.

A new screen will be displayed. A grid with all runs is available there. You can download a log of each run, as well as view its type and start/finish time.

Export

You can start the default export procedure under System -> Data Transfer -> Export. This is the default magento 2 export which is fully described here: Magento 2 Export Guide. Below, we shed light on a completely revamped and simplified procedure introduced with our Improved Import / Export Magento 2 extension. The module allows creating independent export profiles (jobs) which can be run manually from the browser, scheduled by cron, or started via Magento CLI. In case of a manual run, you get a downloadable export file with all specified data right in your browser.

Export Jobs

As for export jobs, they are available under System -> Improved Import / Export -> Export Jobs. You can find a grid that contains all jobs. The following information is displayed in the grid:

  • ID – this column shows job ID;
  • Title – job title is displayed here;
  • Status – a job can be enabled or disabled; this information is displayed in the ‘Status’ column;
  • Cron – the Cron column illustrates the cron schedule you specified in the job settings;
  • Frequency – it is possible to set a custom or predefined frequency of jobs; the appropriate information is shown in this column;
  • Entity Type – an entity that is exported by the job;
  • Export Source – a place the export file will be moved to.

In the ‘Action’ column, you can edit/delete jobs as well as change their statuses. Alternatively, you can apply these actions to multiple jobs simultaneously.

Also note that it is possible to change crone schedule right in the grid:


Add New Export Job

Now, let’s add a new job, illustrating the new functionality of Improved Import/Export. Hit the big orange ‘Add New Job’ button – you will be transferred to a new screen, which is divided into 4 sections: General Settings, Export Settings, Export Behaviour, and Export Source. Let’s describe each one.

General Settings (Cron Schedule)

Here, you can enable/disable the job. Depending on the selected option, the job status is changed from ‘Enabled’ to ‘Disabled’ or vice versa.

Next, type a job title. We recommend you to use an expressive title that describes your new job. This will help you find the job in the grid or understand what jobs are enabled/disabled.

Now, it is necessary to configure the frequency of your export job. Although, you can always create a custom schedule (select the ‘Custom’ option in the ‘Frequency’ field), it is recommended to use the ‘Cron Schedule’ field (the field where you create a custom schedule) only if you understand cron well and have some previous experience in configuring this setting.

Alternatively, it is possible to select one of the predefined schedules:

  • None (manual run only)
  • Every minute;
  • Every hour;
  • Every day at 3:00am;
  • Every Monday at 3:00am;
  • Every 1st day of month at 3:00am;
  • Custom.

The first section of the export job configuration page is now complete. You know how to change job statuses and create cron schedules. The following gif illustrates the aforementioned processes:


Export Settings

Now, it is necessary to proceed to the second section of the configuration page – Export Settings. Here, you can only select an entity that will be exported. Currently, the extension allows you to export the following entities:

  • Advanced Pricing;
  • Products;
  • Customers Main File;
  • Customer Addresses;
  • Order.

As you can see, the first 4 entity types are available in the default export procedure. The Improved Import / Export Magento 2 extension adds a new one – Order. Thus, you can easily export all orders automatically according to the predefined schedule. Let’s describe how to configure other export job sections on the example of the ‘Order’ entity type. Select ‘Order’ in ‘Entity’.


Export Behavior (CSV, XML, TXT Export)

This section allows selecting a file format. You can export orders and related data via the standard CSV format or choose XML or even TXT. Note that you can use XML files of the following format: Magento 2 Import Export Sample XML Files. Alternatively, you can upload any other format, but it is necessary to use mapping. Fore more up-to-date examples of import/export files in all formats, follow this link: Import Export Sample Files for Magento 2.

Next, specify field separator, multiple value separator, and field enclosure. Characters you specify there depend on system requirements of the platform you are going to export your order data to.

Next, choose entities that will be included into a CSV file you are going to export. The Improved Import/Export Magento 2 module provides the following entities:

  • Order;
  • Items of Order;
  • Addresses;
  • Payments;
  • Shipments;
  • Item of Shipment;
  • Invoices;
  • Item of Invoice;
  • Credit Memos;
  • Items of Credit Memo.
  • Note that some items may not be compatible.

Export Source

While selecting an export source, the extension offers 3 variants: File, FTP, and SFTP.

Choose the first one and specify a file path – your export source configuration is complete.

In case of FTP or SFTP, it is also necessary to specify Host, Port, Username, and Password. You can always check whether the provided parameters are correct by clicking the ‘Check Connection’ button.

This was a basic export job configuration. Now, you can click ‘Save & Run’ to test the new job. If exported file has a structure that differs from the default export file, then apply mapping. If it satisfies the requirements of your external system, start export right now. Below, we describe this process in a more detailed manner.


Map Attributes (Mapping & Hardcoded Values)

In this section, you can export fields specified in mapping only or all entity-related attributes. Turn the appropriate feature on to get a file with selected options only.

To do mapping, follow this step by step guide:

1) Hit the ‘Add New’ button;

2) Select an entity enabled in the ‘Export Behaviour’ section (‘Entity’ column);

3) Select a system attribute that should have a custom name in the export file (‘System Attribute’ column);

4) Specify a custom name for the attribute selected in the previous step (‘Export Attribute’);

5) If necessary, specify a hardcoded or default value for the attribute (‘Default Value’ column), which will be provided to all items in the attribute column;

6) Repeat the previous steps to map more attributes.

Note that you can delete each attribute mapping by clicking the black bin icon and move rows by clicking on the left dotted area and applying drag&drop to the row.


Filters

Now when you know how to apply mapping and use hardcoded (default) values, we’d like to describe how filters work. Follow these steps to master the feature:

1) Click the ‘Add Filter’ button;

2) Select an entity enabled in the ‘Export Behaviour’ section (‘Entity’ column);

3) Select a system attribute that will be used as a basis of a new filter (‘Field’ column);

4) Specify parameters that will be applied for filtering (‘Filter’ column).

5) Repeat the previous steps to create more filters.

Note that parameters applied for filtering vary, depending on the attribute chosen (field).

It is possible to delete each filter by clicking the black bin icon. To move rows, click on the left dotted area and drag&drop the row.

Now, you can save and run the new job as well as only save it. The appropriate buttons are available on the top of the screen:

To run the job from the Magento 2 admin (previously, this was possible only via CLI), choose ‘Save & Run’.

Hit the ‘Run’ button. When the export is complete, the system will inform you that the process is over – a link for a file download will be displayed. Besides, you will see the run log.


Run Import/Export Jobs Via CLI

Import cron jobs can be enabled, disabled, or started from the Magento 2 CLI interface. In the Magento 2 root folder, run the following command:

You will see the following information in the terminal:

This is how everything works:

To control export jobs via CLI, use the following commands:

You will see the following information in the terminal:

Both import and export commands:

Specific Features & Use Cases

Categories import

Categories can be imported with different behavior – Add / Edit , Delete, and Replace which allows flexible category manipulations.

To import categories to Magento 2 you need a file with the following structure: Download sample CSV files for categories import to Magento 2

            Category import offers different opportunities, so you can set a category position and location:

  • Import by name and full path to category  (Default Category/Women/Dresses);
  • Import by category name & path to category
  • Import by parent category id (parent_id)

CSV file columns: 

    • name – Category name
    • Parent_id – existing parent category id
    • url_key – URL keys of category
    • Description – category description
    • Is_active – category Enabled / Disabled
    • Include_in_menu – include category to main menu on frontend
    • Is_anchor –  Is Anchor – required for displaying layered navigation on category
    • Custom_layout_update – custom XML layout update for category

Once extension is installed and enabled – you will have categories in entities dropdown for import :

magento 2 categories import

Product attribute values on the fly import

Product attribute values which do not exist in your Magento 2 database will be automatically created on the basis of info from a product import CSV file. Default Magento 2 requires creating product attributes manually before importing products with them. This feature can save tons of time for importing large amount of products with different attribute values to Magento 2.

Product attributes import – creation of new attributes on the fly during the product import

The idea behind the import of product attributes to Magento 2 on the fly during the product import is pretty simple – instead of having only attribute name on a column with attributes, we place there all data required for attribute creation. For instance, attribute set, frontend labels, scopes, etc. You can find a structure sample and a sample CSV file below. Please follow the example carefully and import a CSV file with products first. If it works correctly, you can create a custom attribute column and add new attributes. This will reduce possible problem, debug time, and time necessary to fix issues.

The general format of an attribute creation column can be described as follows:

attribute name | attribute property name : attribute property value | …

In the table below, you will find each property required for attribute creation in Magento 2 during import process as well as appropriate possible values. As you can see, only attribute set and frontend label are required for creating a new attribute in Magento 2 during the import process. Another quite important attribute property is attribute code which actually define the type of your attribute (text field, dropdown etc). If you do not specify it, attribute will be created with type XXX

Download CSV file sample for import product attributes on the fly

Column name example: 

Code Description Default value Required type Values
attribute_set Attribute Sets
Comma separated attribute sets names
Yes text For example: Default,Accessories
frontend_label_0 Default label Yes text
frontend_label_[n] Default label for specified store
Where [n] is the store id
text
frontend_input Catalog Input Type for Store Owner select text: Text Field
textarea: Text Area
date: Date
boolean: Yes/No
multiselect: Multiple Select
select: Dropdown
price: Price
media_image: Media Image
swatch_visual: Visual Swatch
swatch_text: Text Swatch
weee: Fixed Product Tax
attribute_code Attribute Code
This is used internally. Make sure you don’t use spaces or more than 30 symbols.
text
is_required Values Required 0 yes/no 1, 0
is_global Scope
Declare attribute value saving scope
0 select 0: Store View
1: Global
2: Website
default_value_text Default Value
Used for text attributes
text
default_value_textarea Default Value
Used for textarea attributes
text
default_value_date Default Value
Used for date attributes
text Format: mm/dd/YYYY (04/19/2016)
default_value_yesno Default Value
Used for yes/no attributes
yes/no 1,0
is_unique Unique Value
Not shared with other products
0 yes/no 1,0
frontend_class Input Validation for Store Owner select validate-number
validate-digits
validate-email
validate-url
validate-alpha
validate-alphanum
is_used_in_grid Add to Column Options 1 yes/no 1,0
is_filterable_in_grid Use in Filter Options 1 yes/no 1,0
is_searchable Use in Search 0 yes/no 1,0
search_weight Search Weight integer
is_visible_in_advanced_search Visible in Advanced Search 0 yes/no 1,0
is_filterable Use in Layered Navigation 0 yes/no 1,0
is_filterable_in_search Use in Search Results Layered Navigation 0 yes/no 1,0
position Attribute position in layered navigation integer
is_used_for_promo_rules Use for Promo Rule Conditions 0 yes/no 1,0
is_html_allowed_on_front Allow HTML Tags on Storefront 1 yes/no 1,0
is_visible_on_front Visible on Catalog Pages on Storefront 0 yes/no 1,0
used_in_product_listing Used in Product Listing 0 yes/no 1,0
used_for_sort_by Used for Sorting in Product Listing 0 yes/no 1,0

products_2_add_with_new_attributes – import of product attributes – CSV file structure sample: 

 

Import downloadable products in Magento 2

Files for downloadable products can be imported in two ways:

1. Import files from remote URL for downloadable products – you should specify a full URL address of the file and make sure the the following directory exists and is writable:  /pub/media/downloadable/links/files/
2. To import local files, upload your files to the directory you’ve chosen on the import page (input – Images File Directory).

Download CSV file example for import downloadable product

CSV File samples

You can download CSV file samples here:

Download CSV sample files for import to Magento 2

Upcoming Features

Since we always try to improve our Improved Import Export extension following community and merchant needs, here are upcoming features which will be introduced soon:

  • Advanced XML usage;
  • Support for JSON;
  • Import / export for all Magento 2 entities: shipping data, coupons, discounts, CMS pages, etc;
  • Order import;
  • Excel support;
  • Performance improvements;
  • New import/export presets;
  • API connection for SAP, ERP, PIM, and CRM systems;
  • Renewed email reporting; 
  • Integration with IceCat;
  • Import from SOAP / REST API;
  • Mapping presets management;
  • Multiple files and sources input for one job.

After purchasing the extension, you will receive free upgrades during one year and get a 50% discount for the second year upgrades! Purchase the extension right now to use current features and get free updates with advanced functionality!

For further information and consultation or to request individual features use our contact form!

Buy Improved Import Magento 2 Extension