Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Migrating from Magento 1 to Magento 2 @ Magento Meetup Wien

405 views

Published on

This is my talk on "Migratin from Magento 1 to Magento 2", updated for the Magento Meetup Wien in September 2016.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

Migrating from Magento 1 to Magento 2 @ Magento Meetup Wien

  1. 1. Migrating from Magento 1 to Magento 2 Matthias Zeis 21.09.2016
  2. 2. Vienna, Austria mzeis mzeis mzeis matthias-zeis.com
  3. 3. Who of you works with Magento 2?
  4. 4. Who of you is migrating stores to Magento 2?
  5. 5. https://twitter.com/mzeis/status/777113806573019136
  6. 6. SCENARIO Merchant wants to migrate from M1 to M2 © Rebecca Slegel
  7. 7. WHAT? WHEN? HOW?
  8. 8. DATA CODE THEME
  9. 9. Treat it like a platform switch because it is
  10. 10. MIGRATING DATA Core data 3rd party data Your data © Ron Cogswell
  11. 11. Official data migration tool magento/data-migration-tool
  12. 12. Does Products & categories Orders & Invoices Shipments & credit memos Core Configuration Customers Wishlists & Ratings
  13. 13. Does Doesn‘t Products & categories Orders & Invoices Shipments & credit memos Core Configuration Customers Catalog DB layout updates Web API credentials Wishlists & Ratings Admin users & privileges Media files Custom data 3rd party data
  14. 14. 1 Add repository composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool 2 Install tool composer require magento/data-migration-tool:<version> 3 Configure http://devdocs.magento.com/guides/v2.0/migration/migra tion-tool-configure.html
  15. 15. 1 Migrate settings php bin/magento migrate:settings /path/to/config.xml 2 Migrate data php bin/magento migrate:data /path/to/config.xml 3 Migrate delta php bin/magento migrate:delta /path/to/config.xml
  16. 16. Add mappings for custom tables and table columns COPY IGNORE RENAME TRANSFORM
  17. 17. A FEW LEARNINGS (a.k.a. what bit me)
  18. 18. Massive tool Team is working on it
  19. 19. Massive tool Team is working on it Schedule time
  20. 20. Clean up your data
  21. 21. Automate the process
  22. 22. Make tool run through first, then configure properly
  23. 23. Organise config files
  24. 24. Configure extension data migration manually
  25. 25. Test delta migration thoroughly
  26. 26. Alternatives ubertheme/module-ubdatamigration Alternative to official data migration tool firegento/FireGento_FastSimpleImport2 Wrapper for Magento 2 ImportExport functionality firegento/FireGento_ExtendedImport2 Extended features for Import (ported from AvS_FastSimpleImport)
  27. 27. MIGRATING CODE 3rd party code Your code © Peter Gronemann
  28. 28. 3rd party functionality
  29. 29. 3rd party functionality needed in new store?
  30. 30. 3rd party functionality DELETE needed in new store? missing in M2 core? no yes
  31. 31. 3rd party functionality DELETE needed in new store? missing in M2 core? USE M2 CORE continue with vendor? no no yes yes
  32. 32. 3rd party functionality DELETE needed in new store? missing in M2 core? USE M2 CORE continue with vendor? other 3rd party or custom? no no yes yes no
  33. 33. 3rd party functionality DELETE needed in new store? missing in M2 core? USE M2 CORE continue with vendor? other 3rd party or custom? OTHER 3RD PARTY DO IT YOURSELF no no 3rd party custom yes yes no
  34. 34. 3rd party functionality DELETE needed in new store? missing in M2 core? USE M2 CORE continue with vendor? other 3rd party or custom? M2 extension available? OTHER 3RD PARTY DO IT YOURSELF no no 3rd party custom yes yes yes no
  35. 35. 3rd party functionality DELETE needed in new store? missing in M2 core? USE M2 CORE continue with vendor? other 3rd party or custom? M2 extension available? OTHER 3RD PARTY DO IT YOURSELF USE M2 EXTENSION no no 3rd party custom yes yes yes yes no no
  36. 36. your M1 functionality
  37. 37. your M1 functionality needed in new store?
  38. 38. your M1 functionality DELETE needed in new store? missing in M2 core? no yes
  39. 39. your M1 functionality DELETE needed in new store? missing in M2 core? USE M2 CORE 3rd party or custom? no no yes yes
  40. 40. your M1 functionality DELETE needed in new store? missing in M2 core? USE M2 CORE 3rd party or custom? 3RD PARTY DO IT YOURSELF no no 3rd party custom yes yes
  41. 41. your M1 functionality DELETE needed in new store? missing in M2 core? USE M2 CORE 3rd party or custom? 3RD PARTY DO IT YOURSELF no no 3rd party custom yes yes REWRITE? MIGRATE?
  42. 42. rewrite extension automated testing document M1 behaviour platform independent code coding standards
  43. 43. rewrite extension automated testing document M1 behaviour platform independent code coding standards Awesome integer_net article series: https://www.integer-net.com/magento- 1-magento-2-shared-code-extensions/
  44. 44. migrate extension clean M1 code document M1 behaviour platform independent code refactor
  45. 45. Official code migration tool magento/code-migration
  46. 46. Does Namespaces Configuration XML files Layout XML files Magento code interaction Module directory structure
  47. 47. Does Doesn‘t Namespaces Configuration XML files Layout XML files Magento code interaction Module directory structure Template files & design Changes in business logic
  48. 48. 1 Get code git clone https://github.com/magento/code-migration 2 Install tool composer install
  49. 49. <src> Code to be migrated (excluding core) Prerequisites <m1> M1 project code including vanilla core <m2> M2 vanilla core <dst> Empty directory for generated code
  50. 50. 1 Migrate directory structure php bin/migrate.php migrateModuleStructure <src> <dst> 2 Migrate layout php bin/migrate.php convertLayout <dst> 3 Migrate configuration php bin/migrate.php convertConfig <dst> 4 Migrate PHP code php bin/migrate.php convertPhpCode <dst> <m1> <m2>
  51. 51. Don‘t get confused with directories
  52. 52. USE OUT OF THE BOX MAPPING Is your Magento 1 version current? noyes GENERATE YOUR OWN MAPPING
  53. 53. 1 php bin/utils.php generateClassDependency <m1> 2 php bin/utils.php generateClassMapping <m1> <m2> 3 php bin/utils.php generateModuleMapping <m1> <m2> 4 php bin/utils.php generateTableNamesMapping <m1> 5 php bin/utils.php generateViewMapping <m1> <m2> 6 php bin/migrate.php generateAliasMapping <m1> <m2> 7 php bin/migrate.php generateAliasMappingEE <m1> <m2>
  54. 54. Generating mappings yourself can be tricky
  55. 55. Double-check what was (not) converted
  56. 56. 1 Be pragmatic 2 Work together 3 Learn together
  57. 57. Sergii Shymko @ Imagine 2016: Code Migration Tool Presentation & Slides Noelle Darlington @ Imagine 2016: Migration from M1 to M2 Presentation Resources
  58. 58. Official data migration guide http://devdocs.magento.com/guides/v2.0/migration/bk- migration-guide.html Data migration experience by Marcin Szterling (English, Youtube) Marcin Szterling - Data Migration from Magento 1 to Magento 2 Resources
  59. 59. Data migration experience by Sven Wappler (German) https://www.wapplersystems.de/blog/slides-zum-vortrag- magento-002-migriere-an-einem-anderen-tag-sind-online/ Data migration experience by Eugen Bogdanovich (English) http://oyenetwork.com/articles/data-migration-to-magento2- case-study/ Resources
  60. 60. Matthias Zeis mzeis mzeis mzeis matthias-zeis.com Thank you! Questions?
  61. 61. Matthias Zeis mzeis mzeis mzeis matthias-zeis.com Thank you! Questions? Slides will be online: http://www.slideshare.net/mzeis/
  62. 62. Matthias Zeis mzeis mzeis mzeis matthias-zeis.com Thank you! Questions? Slides will be online: http://www.slideshare.net/mzeis/ LimeSoda is hiring! https://www.limesoda.com/jobs/

×