From Magento to Shopify - A Successful Migration Story
Dzmitry Pakhunou
Technical Lead at Able Canyon Commerce | Technology Leadership, Magento, Shopify
Introduction
In this article, I would like to share our experience of a successful migration from Magento 2 EE Cloud to Shopify Plus. I won't delve into the specific differences and features of these platforms or the reasons behind the migration, as they are subjective for each company. Numerous articles already discuss the distinctions between Shopify and Magento. Instead, my focus is on detailing the migration process from the decision-making date to the go-live date, highlighting certain technical nuances. I hope this article proves helpful to those contemplating a shift to Shopify, offering insights to navigate potential challenges encountered during migration.?
So, let's begin.
So, you or your client have decided to transition from Magento to Shopify. Where do you start? Here's an approximate plan for migrating a medium/large store:
Naturally, this is a rough list of steps that can be adjusted by adding missing items or reducing unnecessary ones. For instance, if there are no products in Magento (or they won't be needed in Shopify, or they will be added directly to Shopify), step “Migrate products” is not required. However, it provides a basic framework for describing and evaluating the migration process.
Prepare a roadmap and assess the migration.
First and foremost, we formulate an overall migration plan, defining key dates and deadlines for each of the aforementioned steps. Creating a migration roadmap from Magento to Shopify is a crucial stage in the store transition process. In this roadmap, we outline necessary steps, analyze data, and pinpoint key migration moments and individuals responsible for specific stages. Additionally, conducting an audit of the current Magento site is essential to identify components you wish to migrate to Shopify.
Assuming the migration decision has already been made, the migration assessment will be conducted solely in the context of the necessary resources and working hours for a successful transition. Thus, we skip the step of evaluating migration in terms of its pros and cons for your business.
How do we assess migration? First and foremost, we determine the volume of data for migration, as it constitutes the primary time-consuming stage. Next, we compile a list of modules for transfer and development, find Shopify equivalents, and ultimately address the theme issue. It's also crucial to allocate time for testing, staging deployment, and migration preparation. While this may seem straightforward, it's important to always consider risks and unforeseen circumstances, break down large stages, and account for various factors. In my view, the assessment is a crucial stage in the migration process as it directly impacts many aspects to ensure the final result is a functional store. Perhaps in the future, I will delve into this topic in more detail.
So, we've prepared the roadmap and provided a preliminary assessment. What comes next? The next step involves analyzing current modules in Magento and compiling a list of modules we want to see in Shopify.
Prepare a list of modules.
At the current stage, it is essential to compile a comprehensive list of modules located in the app/code/ directory. We need to determine whether we require the functionality provided by each module in the Shopify platform and identify counterparts for Shopify. If there are no Shopify Store equivalents for certain modules (https://apps.shopify.com/), a decision must be made to either exclude the corresponding functionality from the store or develop a custom module (functionality) for Shopify.
After creating the list of modules intended for installation on Shopify, the next step is to register and acquire appropriate accounts for services providing paid modules. If a staging environment exists in Shopify, these modules can be installed there, and their functionality can be configured. In the absence of staging, it is necessary to create one initially (https://accounts.shopify.com/signup). Additionally, it is crucial to ensure that the selected modules are compatible with the current version of Shopify and do not conflict with other installed applications.
Create a theme.
Once we've finalized the list of modules and identified the necessary functionality, it's time to focus on the visual presentation of your store. If you already have a theme in Magento and wish to maintain its identity and color scheme, there are two options:
When choosing one of these options, consider the complexity of your store, the number of third-party modules displaying additional information on the frontend, customization of standard Shopify blocks, and how this will impact your budget for theme creation. If your store has minimal customizations, options 1 or 2 may be the best choice. However, if you desire something unique, and no theme in the Shopify theme store suits your needs, option 3 is viable but bear in mind it will require more time and a larger budget.
Theme creation is not a complex process and does not demand extensive resources. If you lack developers with experience in creating Shopify themes, a proficient frontend developer with minimal knowledge of Liquid can quickly grasp the nuances of working with Shopify. Below are links to articles and guides on theme creation:
Develop plugins and integrations.
In our specific case, we needed to create only one plugin, but with a considerably complex logic. In essence, it had to be an application hosted on a remote server (in our case, it was Amazon AWS) that facilitates inventory synchronization across different shops upon purchasing a product in one of them. Additionally, it needed to send orders created in Shopify to an external SAP system.
To build this application, we utilized the standard Shopify APP Template - https://github.com/Shopify/shopify-app-template-php, which consists of Laravel (starting from version 8, later updated to the current 10.x) for the backend, and ReactJS + Polaris for the frontend.
领英推荐
Given the application's requirement to handle large volumes of data, we opted for Amazon RDS as the database with indexing of necessary tables and Amazon SQS for queue processing.
Overall, creating a plugin for Shopify is not inherently complex, but it does require the necessary expertise to write high-quality and scalable code. The timeline for development is comparable to creating a plugin for Magento with a custom UI.
Migrate orders and customers.
We opted to use a third-party plugin for migration to save time on error handling during import via Shopify's standard tools and expedite the overall process. Our choice was Matrixify, which perfectly met our requirements - https://matrixify.app/.
The primary challenge arose from dealing with over 1.2 million orders created in different stores, destined for import into various Shopify shops, along with over 200,000 customers. While customer import posed no significant issues since they were all linked to a single website, devising a solution for importing orders into the correct shops required careful consideration.
Initially, we created a bash script that generated separate CSV files for each store with orders, utilizing complex SQL queries to retrieve comprehensive order data beyond the sales_order table. Subsequently, using another bash script, we converted the exported order CSV files into a format supported by Matrixify. During the conversion process, we modified data for orders that were not imported correctly into Shopify, addressing issues with shipping addresses, order totals, item prices, etc.
During the import, we observed that orders with bundle products appeared incorrectly in Shopify. Consequently, we decided to write another script capable of modifying this data in the original CSV. Since bash lacked the necessary functionality for reading and processing CSV files line by line, we turned to a Python script. Initially, PHP was considered, but due to the large size of the CSV files containing 4-5 million records (individual rows for orders and order items), the Python script proved significantly faster than PHP in terms of reading records.
After 2-3 import iterations, we obtained accurate data for all orders, order items, and order totals, categorized by Shopify shops.
Migrate products.
Product migration was relatively straightforward, given the modest count of around 20,000 products, with the majority being simple products. Configurable products were transformed into products with variants. However, for bundle products, a plugin was necessary, and a small script was devised to transform the original Magento CSV file for bundles into the required format for Shopify. It's worth noting that for the successful transfer of attributes edited in Magento using a WYSIWYG editor, they needed to be moved to Shopify's metafields with the type Multi-Line text, rather than Rich Text. In contrast to Rich Text, which stores data in JSON format, Multi-Line text ensures more convenient interaction with data in Shopify.
CMS Content
Due to the distinct template engines and visual editors used by Magento and Shopify, creating pages, blocks, and widgets had to be done manually. With sufficient knowledge of the Liquid template engine and experience with Shopify's visual editor, replicating Magento pages posed no major challenges. Shopify boasts a convenient and functional page editor that supports sections, blocks, and widgets. Additionally, it facilitates theme customization, file management directly in the admin panel, and versioning for themes.
In my opinion, this system is more user-friendly and functional than Magento.
Preparation for Going Live / Final Data Migration
Preparing for the go-live phase, especially in the final stages, requires careful planning and implementing several crucial steps. Initially, defining the go-live dates, preparing the domain, and securing subscriptions for necessary services and plugins to ensure they function on the live domain are essential. Creating a detailed task list for the day before and the actual go-live day is beneficial, providing systematic processes and preventing potential issues.
One day before the planned go-live, a key moment occurs - the final data migration. This step not only ensures the preservation of recent orders and users but also guarantees the currency of inventory and product data.
Additionally, before going live, it is advisable to conduct load testing to ensure your website is ready for incoming traffic. This helps identify potential bottlenecks in the infrastructure, allowing for timely measures to address them. Also, it's crucial to create backups of all data before going live to quickly restore system functionality in case of unforeseen situations.
Going Live
Once all the previous migration stages have been successfully completed, the final and, if all steps are executed correctly, the simplest stage begins. We switch DNS, and if necessary, perform an additional migration to eliminate potential issues. Immediately after DNS switching, we implement HTTP authorization, adding an extra layer of security to the go-live process.
Next, to ensure the stable operation of your site on the new platform, we subject it to smoke testing, with a focus on identifying and resolving critical bugs. Upon successful testing completion, we remove HTTP authorization, and voilà - your Shopify-based online store is ready to go live.
Conclusion
This article was primarily written to share our experience of migrating from Magento to Shopify.
Yes, during the migration process from Magento to Shopify, we encountered a series of challenges that required considerable effort and time to overcome. From data analysis to transferring the product catalog and configuring the new platform, each stage demanded a meticulous approach and expert intervention. However, thanks to thorough preparation and our expertise, we successfully completed the project.
Upon completion of the migration, the client was satisfied as we accomplished a complex and extensive task within a short timeframe. The new Shopify-based website not only operated flawlessly but also brought noticeable improvements in performance and user experience. The client was highly pleased with the results, noting an increase in conversion rates and more convenient content management. Ultimately, the successful migration proved to be a pivotal moment in the business's development, highlighting the importance of professionalism and a careful approach when transitioning to new platforms.
Head of Sales and Business Development | E-commerce Expert
1 年What about the custom features you had at the Magento side? Were you able to implement everything as Shopify extension? Or just revamped to use native SaaS features only?