Feb 12

Importing products from Magento to WP e-commerce

If you have come to this post looking for an easy, straightforward way to get products from Magento to WordPress e-commerce, this is not for you.  If you don’t mind digging around in databases and unclear directions, then welcome, sorry for the mess, have a seat (just shoo off the cat there – oh, is that a hairball? let me get you a new cushion).

I had a tiny shop in Magento Community (because I was too scared to update it, that’s why) but decided to move it all to WordPress using the WP e-Commerce plugin.  Even though the shop is quite small, I didn’t want to have to put in every product by hand.  So here’s what I did… (nb: as these weren’t large tables and I didn’t know what I was doing, I decided to dump the whole table and edit down to what I needed in Excel.  You might want to do it properly. You might not.  Also, I’m setting up WordPress on another server, so don’t have both of these installed on one.)

  1. In Magento: export the catalog_product_flat_1 table to a csv file
  2. Neaten up a version of csv file so you have the columns: Description, Additional Description, Product Name, Price, SKU, weight, weight unit, stock quantity, is limited quantity
  3. Save another version keeping at least the name and the relative image path intact (this is used for the images, as might be obvious)
  4. In the “import” tab of the plugin, import the file

Easy peasy, lemon squeezy.  Except, of course, where are the images?  They are nowhere.  They are not there.  Bastards.  So here’s where it gets a little dodgy and you’ll have to use these following directions as a guide.

    1. Find your images in Magento and download them.  You can figure out their path using the catalog_product_rule_flat_1 table
    2. In WordPress admin, upload them into the media library.  Have a cup of coffee.
    3. You need to know the post ids of the product posts and the post ids of the image posts (attachment paths are saved as posts when uploaded) – go into wp_posts and export those.

At this point it gets a little fuzzy, so I’m going to stop numbering the steps.  This is all step 5.

The table wp_postmeta is where the linking of the image to the post happens –

post_id is the post id of the product post and meta_value is the post id of the image post.  What you need to do is write a series of insert statements eg:

insert into wp_postmeta (post_id, meta_key, meta_value) VALUES (18,’_thumbnail_id’,29);

I think I put the post ids on my copy of the Magento table with the image paths (edited down to filenames) then used the image filename – the same(ish – enough) in both the Magento table and the WP table – to match up the image post ids to the product post ids.  That might not make a lot of sense but you should be able to look at what you have and figure out how to get everything together.  I then simply wrote my statements in Excel:

=CONCATENATE(A18, “VALUES (“,B18,”,’_thumbnail_id’,”,C18,”);”)
where: A18 = insert into wp_postmeta(  ; B18 = the product post id ; C18 = the corresponding image post id

and slapped them into the table.


 This only gives one image per product but that’s fine for me.

Feb 12

Buy, buy again

The start of this post was about beauty blogs but I don’t read them, except occasionally, except Facegoop which is utterly funny and fantastic and if I don’t read that regularly, it’s because they don’t post regularly.  Bad M! Bad E!  I do flip through other ones every now and then to see the latest and greatest but always get the feeling that they’re testing testers and it’s not a true measure of a product.  What I would love to know is what people repeatedly buy and not because they’re in a rut but because they like the product enough to not buy the current hot new thing.

Here are mine with photographic proof that they get heavy use. Oh!  You need to know about my face.  I’m 40, have dry-ish skin and eyelids that get irritated if I’m not a little careful.  Serious under eye circles but no bags.  I need yellowy foundation and concealer and look better in makeup although I don’t wear tons.

Lipstick Queen in Saint Wine and Saint Nude

These are sheer lipsticks with colour that can be built up a bit – there’s not a ton of pigment.  The feel is absolutely fantastic; they are not drying at all and excellent even on chapped lips. I swear that Saint Wine has magical powers, too; if I’m stressed or feeling out of control, I slap a bit on and am ready to face things.  Saint Wine is a more blue-y red and Saint Nude is, well, nude.  If you know what colour would look good on someone who doesn’t wear a lot of makeup, these are a great gift.  (I have had good luck in this department at least. They are one of the most user friendly lipsticks I’ve ever worn.)

By Terry Touche Eclat and Teint Délectation

I tried Teint Délectation after running out of Chanel Vitalumiere and have not switched since.  It’s the reason I (occasionally) get the “you have such lovely skin” compliment.  Lovely stuff – if you’re looking for a change, try it.  Touche Eclat is the only concealer that doesn’t make my wrinkles look wrinklier or make my eyes flakier.  It has great coverage and simply works.  I’m of the opinion that foundation and concealer shouldn’t be too exciting and these aren’t – they just get on doing what they’re supposed to do.

The only thing about the Teint Délectation bottle is the stupid metal coating on the top.  It’s been flaking off and into the squirt of foundation, so I end up with metal flakes on my face.  I need to stop putting the cap back on, really, but I like putting the cap back on.  Dilemma.

RéVive Moisturizing Renewal Cream

This is like putting acid on your skin. It burns! The pain!  I love it.  I imagine it’s dissolving away old, tired skin so that new, lovely skin can come through.  I have no idea what the bumpf says – let’s see how close I am…

Results include tight, glowing skin. This rich cream exfoliates, retextures uneven skin, improves skin clarity and creates a luminous, firm and youthful complexion. (from Space NK site)

I totally buy it.  Literally and figuratively.

A couple others

I love Philosophy Hope in a Jar – it’s another moisturiser that can burn and has pretty visible results for me.  What else?  Révive Fermitif Neck Renewal Cream.  It works!  I just haven’t bought more – am trying the Chantecaille one – but I probably will.

Most of these – well, all except one – were bought at Space NK.  I shop there, I like it, especially the Bishopsgate store.  If you do go and don’t have one already, get one of their loyalty cards, definitely worth it!