Migrating from Magento 1 to Magento 2 Matthias Zeis
2016-05-13
Vienna, Austria mzeis mzeis mzeis matthias-zeis.com
Get the best out of Magento 1 Magento 2
WHAT? WHEN? HOW?
Treat it like a platform switch
Treat it like a platform switch
because it is
migration scope
no 1:1 copy
streamline
strategy and goals
new features
migration scope
no 1:1 copy
streamline
strategy and goals
new features
Don't build a 1:1 copy of your current store
migration scope
no 1:1 copy
streamline
strategy and goals
new features
Decide what you really need to keep
Decide what you really need to keep
Don‘t forget your data!
migration scope
no 1:1 copy
streamline
strategy and goals
new features
Re-think your strategy and goals
migration scope
no 1:1 copy
streamline
strategy and goals
new features
Stuff you didn't implement in M1
New features in Magento 2
migration scope
no 1:1 copy
streamline
strategy and goals
new features
Get your timeline right!
migration
current state
migration scope
timeline
budget
MIGRATING CODE
3rd party code Your code
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
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 extension
automated testing
document M1 behaviour
platform independent code
coding standards
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/
migrate extension
clean M1 code
document M1 behaviour
platform independent code
refactor
<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
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>
Does Namespaces
Configuration XML files
Layout XML files
Magento code interaction
Module directory structure
Does Doesn‘t Namespaces
Configuration XML files
Layout XML files
Magento code interaction
Module directory structure
Template files & design
Changes in business logic
Don‘t get confused
Configuration: check what was (not) converted
Dependencies are not migrated(?)
USE OUT OF THE BOX
MAPPING
Is your Magento 1 version current?
no yes GENERATE YOUR OWN MAPPING
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>
Generating mappings yourself can be tricky
MIGRATING DATA
Core data 3rd party data
Your data
Official data migration tool
magento/data-migration-tool
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
Does Products & categories
Orders & invoices
Shipments & credit memos
Core configuration
Customers
Wishlists & ratings
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
Add mappings for custom data and 3rd party
extensions
A FEW LEARNINGS
(a.k.a. what bit me)
Massive tool Team is working on it
Massive tool Team is working on it
Schedule time
Backup database after install
Make tool run through first, then fix
Keep config files outside migration tool repo
Divide config files
Extensions can‘t plug in (yet)
Issues with long-living stores
Examine deltas
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)
1 Be pragmatic
2 Work together
3 Learn together
Imagine 2016 migration tool presentation by Sergii Shymko http://imagine.magento.com/sites/default/files/Mon.Margaux1.1630.SS7%2C8.Technical.pdf Migration diary by Max Pronko http://www.maxpronko.com/story
Resources
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
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
Matthias Zeis mzeis mzeis mzeis matthias-zeis.com
Thank you! Questions?
Matthias Zeis mzeis mzeis mzeis matthias-zeis.com
Thank you! Questions?
Slides will be online: http://www.slideshare.net/mzeis/
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/