Click here to close this tab and return to the app.

Free Product and Category CSV Export for Magento 2

Overview

This free, open-source script exports product data in CSV format from any Magento store. It is specially designed to support very large stores (millions of SKUs). Unlike typical modules or extensions, this is a read-only, standalone script that requires zero changes to your Magento installation. This script can be used stand-alone, or with our Magento Google Shopping Feed Service.

New Features! (April 2020)

  • Support for Magento Commerce (Enterprise) Catalog Staging Module (exports current version)
  • Separate Category CSV export (all attributes)
  • Removed dependencies on flat tables and index tables
  • ~25% faster performance
  • Improved user interface (one-click copy export URL to clipboard)
  • Paging support with SinceEntityId URL parameter and records_per_request config setting
  • Export any table in your Magento database (disabled by default for security)

More Key Features

  • Support for Magento 2.x all versions and editions,
    including Magento Open Source and Magento Commerce
    (previously known as Community and Enterprise)
    with full backward-compatibility to all Magento 1.x versions
  • Export exchange rates and shipping rates (contact us for details)
  • Improved security and PCI-compliance

Installation Instructions

This is a standalone script that makes zero changes to your Magento installation files or database. To install, just copy the two scripts to your website. To uninstall, just delete the two scripts.

  1. Register an account on our website if you haven't already.
  2. Please select a strong password and enter it below.
    Here is a random one for your convenience:     2fjvkkgnw3c7

    This password will be SHA-256 hashed and inserted into the config file that you download below.
  3. Check the box to accept the license terms:
    Aten Software Product Data Exporter for Magento
    
    Copyright ©2017. Aten Software LLC. All Rights Reserved.
    
    Aten Software Product Data Exporter for Magento is 
    free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as
    published by the Free Software Foundation, either version 3 
    of the License, or (at your option) any later version.
    
    Aten Software Product Data Exporter for Magento
    is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    See http://www.gnu.org/licenses/ for
    a copy of the GNU General Public License.
  4. Save both files to your website's root folder.
  5. Open the URL to the code file in your web browser.
  6. Enter your password and click Submit
  7. Select your store and click Export
  8. Copy the resulting URL and use this when you add a feed in your account.

Change/Upgrade Log (Incompatible Changes)

Beginning with version 2020-04-16
json_categories format has changed. It now contains a simple array of full category names that apply to the item, e.g. ["Default Category > Clothing > T-Shirts","Default Category > Specials"].
Added 'records_per_request' => 2147483647 to the config file.
Dropped flat_url_key and flat_url_path fields
Beginning with version 2017-06-17
The password is saved encrypted in a separate configuration file. To upgrade, you can simply overwrite the previous code file and keep the configuration file.

About the Product Export Code for Magento

The product data exporter code consists of a single file that you install in your website. This will create a page on your website from which you can download all the product data from your store.

magento-logo-ShoppingCart.png

The software lets you choose your Magento website, and then it exports the product data in CSV format.

The software is provided open-source and free, licensed under GPL. The exported CSV file can be imported by our Magento Google Shopping Feed Service, giving you the ability to generate data feeds and get listed in all the major comparison shopping engines (Google Shopping, Bing Shopping, Facebook, Connexity, etc.).

The code accepts URL query string parameters to generate the output. 'Command' must be set to 'Export' and 'Password' must be set to the password stored in the configuration file. 'Store' must be set to a valid Store ID. The script is designed to disallow a blank password. The final URL will look like the following, where bold parts should be customized to your store:

http://www.mystore.com/aten_exporter_for_magento.php?     ⏎
    Command=Export&Store=1&Password=ABCDEFG

Export Options

By default, out-of-stock items are included in the export and disabled items are excluded. The script supports the following export options to override this behavior:

  • Exclude out-of-stock products (stock_status=0)
  • Include disabled products (status=0)

Compatibility

  • Compatible with all versions of Magento: 1.0, 1.1, 1.2, 1.3, 1.4, 1.4.1.1, 1.4.2, 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7, 1.8, 1.8.1, 1.9, 2.0, 2.1, 2.2, 2.3, and up
  • Compatible with both Magento Open Source (Community Edition - CE) and Magento Commerce (Enterprise Edition - EE).
  • Compatible with Catalog Staging Module

Notes

  • This is an extremely high-performance script carefully designed to run on the largest stores with minimal resource usage. If some information is not being exported by this script, please let us know.
  • The output is compressed to save bandwidth, if supported by the browser.
  • The output is encoded in UTF-8. Use OpenOffice or LibreOffice Calc if your version of Excel does not support UTF-8.

Paged Export

By default, paging is turned off, so the script will export all your items. This works fine up to around 250,000 SKUs. After that, it may be difficult to get a reliable export due to the length of time the script runs, which may run into web server timeouts and security policies.

Paging is only supported for the product export, not the category export.

The script returns products sorted by entity_id (ascending), where entity_id > SinceEntityId, and limited to records_per_request products. To enable paging, follow these steps:

  1. Edit the config file and set records_per_request to an appropriate number, e.g. 50,000 or 100,000.
  2. In the query string, append &SinceEntityId=0. This will return the first page of results.
  3. Import the CSV file and read the maximum (or last) entity_id
  4. To retrieve the next page, modify the query string so it has &SinceEntityId=NNNN, where NNNN is the last entity_id from the previous file.
  5. Repeat until you get a response with no content, i.e. zero bytes, not even a header line.

Direct Download Links

Click on aten_exporter_for_magento.php to view the code directly.

Click on aten_exporter_for_magento_config.php to view a sample config file. The sample config file will not work unless an SHA-256 hashed password is specified.

Screen Shot

Screenshot of Aten Software Product Data Exporter for Magento 2

Command Line Fetch

  • Install the exporter script into your Magento website directory as described above.
  • Run the following command:
    wget --output-document=export.csv 'http://www.store.com/aten_exporter_for_magento.php?Command=Export&Store=1&Password=ABCDEFG'
  • Be sure to set the output file name, website URL, store ID, and password to your configuration.
  • For Windows, use double-quotes instead of single-quotes.

Command Line Direct Execution

The script can be run directly from the command line, and will output a CSV document to your console.

  1. cd to the folder that contains the script
  2. Run the following: php aten_exporter_for_magento.php 'Command=Export&Store=1&Password=ABCDEFG' > export.csv

Uninstall Instructions

To uninstall, just delete the exporter script and config file. There are no other steps.

  1. cd to the folder that contains the script
  2. rm aten_exporter_for_magento.php
  3. rm aten_exporter_for_magento_config.php
  4. That's it!