Revamping Ik wil een taart: migrating an old version of Orchard Core website with custom theme and commerce logic to DotNest
Migrating the content of an old version of an Orchard Core website with a custom theme and with modifications in the business logic of the Orchard Core Commerce module to DotNest? Yes, it is possible! This case study explores how we achieved this with Ik wil een taart, a confectionery in the Netherlands, by migrating the content of the website running on the RC2 version of Orchard Core to the latest one, on DotNest. The site is a client of Princen group, which is a Dutch company, specialized in web development since 1992, offering secure, user-friendly, and scalable digital solutions.
This is a post by Krisztián Németh, software engineer at Lombiq and project leader of DotNest.
Theme Conversion
Initially, the site had a custom theme written in the Liquid templating language and several templates added via the admin UI too. Our primary objective was to transform this into a Media Theme. First, we focused on maintaining the theme without altering the unique business logic derived from custom modifications in the Orchard Core Commerce source code.
Commerce Features Enhancement
As stewards for the Orchard Core Commerce project, we saw this migration as a perfect opportunity to enhance the product based on real-world feedback. We added local tax calculations, net-gross prices, integrated Stripe payments, and made other minor adjustments. These improvements and many more led to the release of versions 1.0.0 and 1.1.0 of Orchard Core Commerce. You can explore the changes and releases here. Like many other projects of ours Orchard Core Commerce also uses Node.js Extensions to handle assets, and Helpful Libraries to reduce boilerplate. And of course, as this site will be part of DotNest it uses the Privacy module also.
Adding the Commerce Feature on DotNest
DotNest Tenants Core didn't have the Commerce feature, so we added it and deployed it to be available for everyone who wants to create a custom site on DotNest with an Orchard Core tenant. So, feel free to do it, it's there, ready to use!
Adjustments and Additions
After the Media Theme was ready and the new Commerce features were implemented, it was time to adjust the view logic in the Liquid files, leading to some small modifications in the Commerce module. This was exactly the moment where it came in handy that we had a live scenario, so the Commerce module could be enhanced in a very close and fast feedback loop. The biggest challenge was to have the new Stripe payments feature included in the site's custom theme and also because of the changed business logic on how prices were calculated we had to adjust the view logic where it was needed to show prices, sum prices, and tax sums. This was done in three different areas: On the cart summary page, on the successful order page, and in the email template which is being sent after a successful order by a workflow.
Content Migration
Next, we moved the old content and data to the new system. We did it by exporting everything via recipes from the old site and then importing them to the new site locally. Changed some content type and content part-related settings and fields due to the fact that the old site had a bit different structure for products than we have now in Commerce. We used Helpful Extensions for the Page content type, which includes a Title Part, Autoroute Part, and Flow Part. We also used the Helpful Widgets from Helpful Extensions for its Liquid Widget and Html Widget content types. After everything was set a final export was done to be able to deploy that data to the staging environment of DotNest.
Localization
Finally, due to changes in shapes and the addition of parts and view elements in the Commerce module, we had to add Dutch translation to the site using PO files with the help of OrchardCoreContrib.PoExtractor and the Orchard Core documentation about localization.
Conclusion
All in all, the project stands as a successful case of website migration and customization, meeting unique demands.
Feeling inspired by the transformation of "Ik wil een taart" and ready to take your own Orchard Core website to the next level? You're in the right place! Try out the improved Orchard Core Commerce feature on a DotNest site today!
And, if you have any questions or are facing challenges similar to those we tackled in this project, don't hesitate to get in touch with us. We're always ready to bring our expertise to your unique project needs. Contact us today and let's start making your Orchard Core website even better!