GithubHelp home page GithubHelp logo

ecomdev / sync-magento-2-migration Goto Github PK

View Code? Open in Web Editor NEW
59.0 10.0 10.0 229 KB

Release of rough proof of concept from 2018 that allows to import and export millions of products quickly

License: Open Software License 3.0

PHP 100.00%
magento2 import export migration-tool

sync-magento-2-migration's Introduction

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.

sync-magento-2-migration's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sync-magento-2-migration's Issues

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.