Upload
dutchento
View
212
Download
0
Embed Size (px)
Citation preview
Migrating from Magento 1 to Magento 2 Matthias Zeis Meet Magento NL 2016 – 2016-05-13
Vienna, Austria mzeis mzeis mzeis matthias-zeis.com
Get the best out of Magento 1 Magento 2
SHOULD
we migrate?
Outgrowing current solution
Changing focus or business model
Magento 2 functionality &
tech stack
Relaunch planned anyways
Implementing features twice too expensive
Did you find a reason to migrate?
No? OK, then
this talk is over.
Think of this as a re-platforming,
not an update
Re-think Plan Work
WHAT? WHEN? HOW?
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
There's a lot of manual work!
Understand
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 tackle yet
New features in Magento 2
4.936 hours
Time planning
Plan ahead!
M2 Launch
M1 EOL
Today
migration scope
workload
early adopter fee
seasonal business
keep traction
Get your timeline right!
migration
current state
migration scope
timeline
budget
1 Be pragmatic
2 Work together
3 Learn together
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
documentation
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
test cases
platform independent code
refactor
Does Doesn‘t Namespaces
Configuration XML files
Layout XML files
Magento code interaction
Module directory structure
Template files & design
Changes in business logic
<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>
Don‘t get confused
convertConfig: 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
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
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
A FEW LEARNINGS
(a.k.a. what bit me)
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)
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 Szerling (English, Youtube) Marcin Szerling - 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?
Slides will be online: http://www.slideshare.net/mzeis/
LimeSoda is hiring! https://www.limesoda.com/jobs/