User Tools

Site Tools


Sidebar

magento_2:export_products

For more details see the Export Products for Magento 2 extension page.

Guide for Export Products for Magento 2

Migrate product data to third-party systems or other Magento instances without coding. Build multiple flexible export profiles and set automatic migration with Export Products for Magento 2.

  • Transfer all types of products
  • Include any product attributes to export files
  • Run export profiles by cron or event
  • Perform regular or one-time exports with additional export interfaces
  • Adjust export flow based on your server capacity

Solution Structure

Amasty Export by now includes 3 separate modules to perform export tasks:

  • Export Products: a separate export to deal with product entities
  • Amasty Export: suitable for one-time export of any available entity
  • Amasty Export PRO: a tab to create cron jobs concerning export activity

The more Amasty modules you have, the more entities you will be able to export in the first simplified module and in the PRO version. Follow Import & Export solution updates to discover new possibilities.

Note, that if your export managers have specific permissions to the admin panel, you need to grant them access to both Export Products Profiles and Amasty Export. Otherwise, they won't be able to execute the export.

Export Products Configuration

Prior to creating export profiles, please configure the basic product export options.

Go to Stores → Configuration → Amasty Extensions → Export Products.

Enable module - choose Yes to activate the extension.

Export Batch Size - set the number of products that will be processed in an iteration.

Log Auto-Cleaning - set Yes to clean logs automatically. The records will be removed from Export History after the period specified below.

Log Auto-Cleaning Period (Days) - define the period after which export history will be cleaned.

Export Files Auto-Cleaning - if enabled, the generated export files will be automatically removed from the server after the period specified below.

Export Files Auto-Cleaning Period (Days) - identify the period after which the files will be removed from the server.

Enable Multi-Process Export - set to Yes to speed up the export. Remember, that this option is added specifically for products. The multi-process for Amasty Export and Amasty Export Pro should be enabled in the other tab.

The 'Multi-Process Export' feature requires the PHP extension 'pcntl' to be installed on the server. If you enable the feature and no performance boost happens, please ask your hoster/system administrator to check if the 'pcntl' extension is installed.

Number of Parallel Processes - specify the number of processes according to your server capabilities. The more parallel processes are set, the faster the export process goes, but the higher the server loads.

Enable Email Alert - set to Yes to notify the recipients about export failures.

Email Sender - choose the contact that will send automatic emails.

Email Recipients - specify to whom the emails will be sent.

Email Template - choose the template for failure notification.

Export Product Profiles

The extension allows you to create flexible profiles for the products export and execute it on regular basis. To view all the profiles, please go to System → Export Products → Profiles.

You can view, delete, add new profiles or run any of them manually right from the grid.

To create a new profile, hit the Add New Profile button and follow a profile set up steps.

General Configuration

In the first tab, you can adjust the general information of the profile.

Profile Name - specify the profile name for internal usage. This name will be displayed in the grid.

Export Only New Entities - enable this setting to skip the previously exported products. The option is useful in case you export the profile regularly and only recently created products are needed.

Batch Size - set the number of products that will be processed in one iteration. You may configure batch size for each profile separately or specify the value in general configuration settings and use this default value.

Output Options

Proceed to the configuration of output options.

File Name - add the title for the export file.

Use {date|format} to customize filename. Example: Filename-{date|Y_m_d_h_i_s}. Here you may explore more options for date format.

Compress Export File With Gzip - enable the toggle to compress the file and save extra space on a server.

Export File Storage

Choose where to export the profile: on the internal or external server, or send the exported file by email.

If Store Exported File On Server is enabled, provide File Path and File Name on Server. The file will be saved in Magento 'var' directory relative to the specified path.

If you want to Upload Exported File By FTP / SFTP, you will need to fill the following fields:

  • Host
  • User
  • Password
  • File Path
  • File Name for FTP/SFTP.

For FTP you can also enable a Passive Mode.

In case you want to Send Exported File to E-mail, provide:

  • Email Sender
  • E-mail Recipients
  • E-mail Message Subject
  • Email Template.

File Settings

Now you need to choose the required file type and configure its settings.

The following formats are available:

  • CSV
  • XML
  • ODS
  • XLSX

For CSV, ODS and XLSX formats you can:

Add Header Row - column titles will be displayed in this row.

Merge Rows into One - if this setting is enabled, the information from multiple rows will be merged into one cell. The character that delimits each field of the child rows is customizable. Check the GIF in a demo to see how it works.

For a CSV file you can additionally set:

  • Field Delimiter
  • Field Enclosure Character

For an XML file you can customize:

  • XML Item Tag
  • Header
  • Footer

Fields Configuration

In the following step, you can start building your product export file by choosing the data to export. The functionality has a tree structure. Thus, you can add any entity, any field within a particular entity, customize prefixes/tags/delimiters, and so on to match the requirements of the system you are exporting to.

See how the tree-structured file is built:

Step 1. Add root entities

First, you need to configure the basic product entity and select the fields that will be added to the file on the root level.

Click Add Fields button and choose the relevant data to add to the export file.

You may also use a search window right in the popup to find the required fields faster. After selecting all needed fields, click Add Selected Fields.

When a field is added, you can customize a column title that will be displayed in the exported file. Moreover, use the Add Static Filed button to create columns that will remain unchanged in the file.

For each file level, you can set custom tags, prefixes, and delimiters. See how it works:

Step 2. Add subentities

Then you can scroll down the entity list and enable any of them you need for your export file.

Just click the Enabled toggle and Add Fileds button. As it was shown above, a popup will appear and you will be able to add all the needed fields concerning a particular entity. For example, for the Product Attribute entity, you may add product name, sku, description, status, etc.

The same can be done for the entities with a lower level.

This way, you can build a unique profile, suitable for a particular system. Check the requirements from a system (as, for example, an ERP system or Marketplace platform needs different product data) and match the details.

Export Filters

In the next tab, you can apply filtering to specify which products should be exported. The values of all entities and fields you've added to the file in a previous step are available for filtering. For example, you may add the products at a particular price or the products of a particular type.

Expand the necessary entity, click Add Filter, and specify the value you need to export.

You can also Exclude Parent Entity Row If No Results Found. It means that the parent entity row will be excluded from the export file if the child entity doesn't have filter results relative to the parent entity.

Have a look how it works:

Automatic Export

Configure the frequency to run the profile. 2 modes to run a profile are available:

  • by Cron
  • by Event

For exporting by cron, you can set one of the ready-made schedules or create a custom one.

For exporting by event, choose the event that will trigger a profile export. For now, only the export event Product Save is available.

Profile Export History

You can track the dynamics of each specific export profile right in its settings, in the Export History tab. Check the statuses, dates, logs, and the exported number of products. Download a file if necessary.

General Export History

You may also check the logs for all exported profiles in one place. Navigate to System → Amasty Export → Export History. See the statuses and check details to get a full picture.

3rd Party Connections

With the extension, you can link the data generated by 3rd party extensions to the export functionality. All created connections are displayed in the System → Export Products → 3rd Party Connections tab.

Click the Add New Connection button to create a new connection.

Name - specify the connection title for internal usage.

Table to Join - indicate a table name that needs to be joined.

Parent Entity - choose the entity table to which the foreign table will be joined.

Referenced Table Key - the field from the foreign table, by which the table chosen in 'Table to join' will be joined to the parent entity table.

Base Table Key - specify the field from the parent entity table which will be used for joining with the foreign table.

Save the changes. Now you can add this entity to the export file.

Amasty Export: Quick & Simple

This extension also helps to perform one-time operations as it has a simplified UI. If you have only Export Products extension, you will be able to export any product and inventory entity, but if you have other export extensions by Amasty, you will easily export any available entity in one place.

Go to System → Amasty Export → Export and select the entity to export.

As soon as you choose the entity, you will be able to configure export details, such as format, title, included fields, etc. Explore the configuration details for each tab in the Export Profile Configuration sections.

General Settings

To configure the general options for Amasty Export, go to Stores → Configuration → Amasty Extensions → Export.

Enable Multi-Process Export - set to Yes to speed up the export.

The 'Multi-Process Export' feature requires the PHP extension 'pcntl' to be installed on the server. If you enable the feature and no performance boost happens, please ask your hoster/system administrator to check if the 'pcntl' extension is installed.

Number of Parallel Processes - specify the number of processes according to your server capabilities. The more parallel processes are set, the faster the export process goes, but the higher the server loads.

Amasty Export Pro

The extension also includes Amasty Export Pro features: you can create regular cron jobs to export any available entity.

Navigate to System → Amasty Export → Cron Jobs.

The more installed Amasty Export extensions you have, the more entities you can export by cron.

To add a new cron job, click New Export Job.

Specify the cron job title for internal use and set the schedule for exporting. The file configuration algorithm is the same as described in the Export Profile section.


Find out how to install the Export Products extension for Magento 2 via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/export_products.txt · Last modified: 2020/10/01 14:11 by asemenova