A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Overview

Simple Import / Export tool

A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data gets exported without the knowledge of the entity identifiers and delta imports get processed by related unique keys:

  • Categories: id attribute (gets stored in map table)
  • Products: SKU
  • Customers: email + website

When you export data from your existing stores you can configure mapping and skipped row conditions by using configuration.json:

Here is an example of configuration.json that maps all manufacturer attribute code in product data into a brand and skips.

{
  "product_data.csv": {
    "map": {
      "attribute": {
         "manufacturer": "brand" 
      }
    },
    "skip": [
      {
        "store": ["pl", "sk"]
      }
    ]
  }
}

Also, you can add own mappers for exported files. Here is an example on mapping output of product attributes to create website level price instead of global during migration:

{
  "product": {
    "mappers": {
      "product_attributes": [
        {
          "class": "EcomDev\\MagentoMigration\\CustomMappers\\PriceMapper",
          "setup": [
            ["withStore", "us_en", 1.0],
            ["withStore", "uk_en", 0.76],
            ["withStore", "eu_en", 0.89]
          ]
        }
      ]
    }
  }
}

Tests

Right now the automation suite might not run, as tool is released by stripping of all customer specific data from tests and codebase. PRs to re-introduce test cases that has been removed are welcome.

Comments
  • Mismatch between import and export CSV enclosure characters

    Mismatch between import and export CSV enclosure characters

    Export uses a single quote ': https://github.com/EcomDev/sync-magento-2-migration/blob/main/src/CsvFactory.php#L56

    Import uses double quotes ": https://github.com/EcomDev/sync-magento-2-migration/blob/main/src/CsvReader.php#L24

    Bug introduced in this commit: https://github.com/EcomDev/sync-magento-2-migration/commit/518807c02088e4ff6a0cbd4a09786e9d57bc12cd

    opened by erfanimani 5
  • Fixed category import failing

    Fixed category import failing

    Fixes #3 .

    I'm not entirely sure of the implications of setting children_count to 0.

    It can be recalculated as per this comment: https://github.com/magento/magento2/issues/27969#issuecomment-944145373

    opened by erfanimani 0
  • Category import is broken due to missing `path` value in insert

    Category import is broken due to missing `path` value in insert

    Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1364 Field 'path' doesn't have a default value in /var/www/html/sync-magento-2-migration/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:239
    Stack trace:
    #0 /var/www/html/sync-magento-2-migration/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php(239): PDOStatement->execute()
    #1 /var/www/html/sync-magento-2-migration/src/CategoryImport.php(199): Zend\Db\Adapter\Driver\Pdo\Statement->execute()
    #2 /var/www/html/sync-magento-2-migration/src/CategoryImport.php(229): EcomDev\MagentoMigration\CategoryImport->allocateEntityIds(1)
    #3 /var/www/html/sync-magento-2-migration/src/CategoryImport.php(76): EcomDev\MagentoMigration\CategoryImport->resolveExternalCategoryIds(Array)
    #4 /var/www/html/sync-magento-2-migration/src/Import.php(61): EcomDev\MagentoMigration\CategoryImport->importCategories(Object(Generator))
    #5 /var/www/html/sync-magento-2-migration/src/ImportApplication.php(60): EcomDev\MagentoMigration\Import->importCategories( in /var/www/html/sync-magento-2-migration/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php on line 244
    

    Because here we're adding just a parent_id for the ID reservation strategy, but it seems Magento 2.4.3-p1 also requires a path value (and a position and children_count).

    @IvanChepurnyi I assume this can be an empty string because it's purely used for ID reservation. Is that correct?

    opened by erfanimani 0
  • add attribute only, product data only and base64 encode/decode options

    add attribute only, product data only and base64 encode/decode options

    Added new options to:

    1. import export attribute data only
    2. Import/export product data only
    3. Encode data with base 64

    On #3 I had issues with product data that broke csv format, due to usage of non ascii/english chars in product data. Rather than track all this down in 100 1000's products, it seemed simpler to just base64 encode all data going in/out of csv. Since this is a switch, it should not break any existing functionality, and can be used when needed. It does slow down import/export a little bt, but still faster than trying to trap all potential data issues/formats

    opened by ProxiBlue 0
  • Error

    Error "enterprise_catalog_product_rewrite" table not found

    There's a hard reference to Magento Enterprise tables here, causing issues with product export:

    https://github.com/EcomDev/sync-magento-2-migration/blob/main/src/ProductInfo.php#L408

    I managed to get around it by excluding product URL rewrites, and generating rewrites using this: https://github.com/elgentos/regenerate-catalog-urls

    Should there be a check to see if that table exists and/or the current version is Enterprise?

    opened by erfanimani 2
Owner
EcomDev B.V.
Providing High Performance Web-shops since 2010
EcomDev B.V.
Import data from and export data to a range of different file formats and media

Ddeboer Data Import library This library has been renamed to PortPHP and will be deprecated. Please use PortPHP instead. Introduction This PHP library

David de Boer 570 Dec 27, 2022
Import/Export configuration data in Magento 2 via CLI.

ConfigImportExport This module provides new CLI commands for Magento 2 to import/export data in/from core_config_data. This module is inspired by the

semaio 135 Dec 9, 2022
Import/Export configuration data in Magento 2 via CLI.

ConfigImportExport This module provides new CLI commands for Magento 2 to import/export data in/from core_config_data. This module is inspired by the

semaio 117 Mar 23, 2022
Q2A plugin that allows users to import and export Q2A configuration

Configuration Manager [by Gabriel Zanetti] Description Configuration Manager is a Question2Answer plugin that allows users to import and export Q2A co

Gabriel Zanetti 1 Nov 22, 2021
Multi-language field export/import tool for ProcessWire

Language field export/import for ProcessWire Typically the way you translate page field values in ProcessWire is to edit a page, view the text in one

Ryan Cramer 3 Aug 19, 2022
Magento-bulk - Bulk Import/Export helper scripts and CLI utilities for Magento Commerce

Magento Bulk Bulk operations for Magento. Configuration Copy config.php.sample to config.php and edit it. Product Attribute Management List All Attrib

Bippo Indonesia 23 Dec 20, 2022
Magento 2 Preview/Visit Catalog allows the store owner to quickly preview the catalog (product & category) pages from the admin panel.

Magento 2 Preview/Visit Catalog Overview Magento 2 Preview/Visit Catalog allows the store owner to quickly preview the catalog (product & category) pa

Raj KB 4 Sep 27, 2022
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Firebear Studio 173 Dec 17, 2022
Magento 2 - Improved Import / Export extension

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Firebear Studio 173 Dec 17, 2022
This is a class that allows you to import posts from Wix into WordPress.

Wix Posts to WordPress This is a class that allows you to import posts from Wix into WordPress. Requirements Please make sure you have the following i

Basework 16 Sep 8, 2022
Gettext is a PHP (^7.2) library to import/export/edit gettext from PO, MO, PHP, JS files, etc.

Gettext Note: this is the documentation of the new 5.x version. Go to 4.x branch if you're looking for the old 4.x version Created by Oscar Otero http

Gettext 651 Dec 29, 2022
Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery

Mobile App Version Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery. Installation Add to co

Omer Salaj 11 Mar 15, 2022
This is an experiment to export all RFCs from the PHP wiki into Git, including the change history for each RFC (along with the date and author of each change). This is not meant to replace the wiki.

PHP Requests for Comments (RFCs) About This repository is an experiment to export all RFCs from the PHP wiki into Git, including the change history fo

Ben Ramsey 34 Jun 20, 2022
N2Web turns your Notion HTML export into a fully functional static website

Notion2Web N2Web turns your Notion HTML export into a fully functional static website. What is Notion? Notion is an online tool. But I can't tell you

Lars Lehmann 15 Nov 23, 2022
Magento 2 Blog is an extension that allows you to manage your store and blog

Magento 2 Blog Extension by Magefan Magento 2 Blog is an extension that allows you to manage your store and blog from one place without having to rely

Magefan 243 Dec 21, 2022
Neo Integrator adalah alat bantu untuk import data ke Neo Feeder dengan cara copy paste saja. bersifat free dan opensource. Semoga Bermanfaat.

Neo-Integrator Penerus dari SimpleFeeder, yang berubah jadi Excel2Feeder dan bertransformasi menjadi Neo-integrator Last Update : 16-05-2022 Capture :

null 9 Nov 26, 2022
Tool for easy selection and export of user files in ZIP format.

Personal data export Idea Tool for easy selection and export of user files in ZIP format. Within a single selector, you choose all user data (much of

Baraja packages 2 Oct 18, 2021
Magento sample data includes a sample store, complete with more than 250 products

Magento sample data includes a sample store, complete with more than 250 products (about 200 of them are configurable products), categories, promotional price rules, CMS pages, banners, and so on. Sample data uses the Luma theme on the storefront.

Magento 203 Dec 16, 2022