I had been performing maintenance and updates for this client’s Magento 1 site for several years. Although originally built elsewhere, I had become very familiar with the workings and content of the site. Therefore, as the end of life for Magento 1 approached, we were asked to carry out a migration and development project to move them over to Magento 2.
The initial task was to create a migration strategy. The following steps were required:
- Core data migration (products, customers and orders)
- Additional data migration (news, downloads)
- New site development
- Data sync (pulling any changes from the Magento 1 store before switch)
Magento 2 provided a command line tool that could be configured to assist with the moving of core store data. This would ensure continuity between the two sites including product data, customer data and order histories.
Moving additional data was more complex, as several extensions used on the Magento 1 site did not have Magento 2 counterparts. Therefore I found extensions that matched the required features as closely as possible and created custom SQL export and imports to port across and map data to the new site. This proved particularly intricate for handling downloads that were associated with products.
The website needed to handle multiple currencies and display pricing appropriately. Several extensions were available that would handle geolocation, but I wrote custom code to extend this functionality and combine it with checks against registered customer’s data to display the most appropriate store views.
Customisations were added in order to improve the live shipping quotes returned during the checkout process. This included the addition of live currency conversions via an API to improve pricing accuracy, and adding code to handle multiple courier accounts.
We implemented a skinning system based on product categories to give the three main areas of the business their own identity within the site. To do this I introduced checks into product templates to determine which product ranges were active and add CSS classes. These classes were the basis for creating a series of rules, variables and mixins in LESS.
The code for this project was organised into a theme and modules to align with Magento 2 best practices.