by Zan Lete
eCommerce March Madness
Well, that was March! What a great month we have had here, we've been lucky enough to be working on several new projects. One thing lately we have been busy with is eCommerce rebuilds, and in particular, several clients needing pretty big databases moving over in to their new eCommerce platform.
It's cool to have the team challenged by such varying data sets being thrown at us! We have a great love of Magento and Interspire (and 9 times out of 10 these will meet the clients needs) and moving products over in to these can be quite interesting, especially as the previous website might have been run on things like Actinic, OS-commerce and even some bespoke ASP.net carts.
I think the biggest set we have moved this month was 800 products, but nearly EVERY product had a "variation" of size, length, colour etc. so in total it amounted to around 2000 unique SKU's. This one was from an Actinic site (upgrading to Interspire) so we had to clean up an "interesting" CSV file and a bucket load of original images. Time to get the coffee ready, it was going to be a late one!
We tackled this in quite an interesting way (an experiment of some degree I guess) which will hopefully other dev's can try sometime. In essence, we re-created the product, image and category tables of Interspire on a local MySQL database, I think it was about 6 tables in total.
We then deployed CakePHP on the same server and quickly baked the app from the Interspire tables. Why CakePHP? Well, in short, it's what we are comfortable with, we are at the stage where the team are really comfortable with CakePHP and using the core class library for things like this...and from past experience we new the "Folder" and "File” class in particular would come in really useful.
So we then had database, CakePHP app and a big CSV file full of products to be imported. We parsed the CSV into an array to make it easier to work with, then performed a few checks on each item (Did it have variations? What type of variations? What was the image file name? That sort of thing...) then saved each item out into the corresponding table along with the correct path for each product image.
Hey Presto! From memory we completed 95% of the products this way with the first go. Any products we could not import this way had their SKU's wrote to a log file and these were put in manually (some had really weird variations which would have taken ages to code for - it was just quicker to put these in manually through the Interspire admin panel).
The rest of the website is nearly complete and should be going live in the next 10 days, we'll post again when we launch!
The next build this week is going to be a new Magento store, and again we have a sizeable amount of products to move. We are going to do this in a very similar way this time, but instead of saving direct to the database we are going to fire each product in via the API...just to see if we can really I guess! We will write this as a component for others to use, so look out for this in the CakePHP bakery (if it works of course!).
Feel free to get in touch if anyone wants more information, code or actually require help with a new eCommerce project.
Comments
There are no comments for this post yet.
Leave a Comment
Blog Categories
Sign up for Newsletter
To recieve the MJR Web Newsletter enter your email below - its full of goodies!



