Notice: Object of class DOMElement could not be converted to int in /www/wp-content/themes/the-authority/functions.php on line 358
A while ago, my Mom (who runs MadeOn Hardlotion) moved from MailChimp to ActiveCampaign, and started using Shopify for her store website. Recently, she realized some of her older blog posts on her WordPress website were receiving a fair bit of traffic from Google searches. Since 2010, she’s been writing newsletter campaigns for her hardlotion.com email list and had hundreds of emails in her MailChimp archives. She wanted to move the good content over to a Shopify blog to improve her SEO, and asked me if there was a way to do it.
I was learning PHP at the time, so I decided it would be a good way to practice what I knew and learn some new things. I created a small app, which imported all of her MailChimp campaigns into the app, and allowed you to edit them with some basic formatting and one-click publish to Shopify. This allowed her to quickly browse her old email campaigns, re-format them to include relevant content, then publish it, without having to go to either Shopify or MailChimp.
I also designed it so that as well as being able to import newsletter emails into Shopify, you could also update the Shopify blog post with changes made after it was imported. Alternatively, you could save your changes in a campaign content before it’s imported into Shopify it you’re still working on it.
The editor is powered by TinyMCE, which I always use for any kind of simple text formatting, as it’s both free and allows for quite a few features. The frontend uses ajax requests to the backend for any of the data transfer, so requests are not made directly to Shopify or MailChimp. The backend is PHP and MySQL. When importing MailChimp campaigns, I actually only import the dates and names of the campaign emails. The first time a campaign email is opened in the editor, the backend makes a request to MailChimp for the initial content, and stores it in the MySQL database. That way, the database is actually fairly small, and the whole setup doesn’t take long.
It is missing many features that would allow for more than private use, notably unit tests and error handling. However, for a tool for a single person, it works really well and the 80% gets done.