2
votes

Can anyone offer any advice on the best way to fully integrate a wordpress blog into a magento store?

I have seen many different approaches of this integration (lazzymonkeys, sonassi etc), but none seem to fully integrate the entire blog, i.e. posts, categories, archives, search etc.

So far, I have created a module that is essentially a stand-alone blog with seperate blocks, controllers and templates for each part of the blog. Instead of using my own models for the data though, I am calling wordpress functions from my blocks to get the data and then building the templates based on this.

This method allows me to avoid relying on url re-writes and provides full control over the content and layout of the blog. Unfortunately though, it requires a lot of work building all of the different aspects of the wordpress blog back in the magento store.

Basically, I am creating a blog in magento which uses data from a wordpress blog.

Is this a good solution, or can anyone offer some ideas on a better way to approach this?

2
Well you could consider building a Service layer for you model that replaces the DB with WP XML-RPC calls. That way you are consuming the public api instead of rebuilding all the functionality in php. On the downside youre making extra requests when you could be doing it all "inside"...prodigitalson
I must be naive, what advantage does Wordpress give over any other blog extension in Magento?clockworkgeek
@clockworkgeek - have you tried any of the blog extensions for magento? There is a pretty decent one from ahead works which offers most of the functionality but it still behind wordpress in a number of areas: functionality, usability (backend) and flexibility (frontend).Drew Hunter
Drew, I've actually only developed for blog platforms, never posted on one. My outsider experience is blogs are essentially a list of pages with content, dates and comments. The clearest opinion I've read is this one: inchoo.net/ecommerce/magento/… (although it's main point of image uploads has been resolved in Mage 1.4)clockworkgeek

2 Answers

3
votes

a fairly new (and popular with over 3000 downloads) Magento module is Fishpig's Magento/WordPress Integration extension that does exactly what you want. I have used it on a few client sites and have found it to be quite useful. It integrates all aspects of the WordPress blog, uses the Magento theme, supports WordPress plugins and shortcodes (although support is only limited to popular plugins) and adds extra functionality such as the ability to associated WordPress blog posts with Magento products.

You can can download and easily the module from the following link (Magento Connect):

http://www.magentocommerce.com/magento-connect/fishpig/extension/3958/fishpig_wordpress_integration

If you are unable to use Magento Connect, I think the author provides manually download and installation instructions on their website (I can't remember the link but it will be on the Magento Connect page).

0
votes

I havn't done this myself, but one of the books I read while learning magento covers whis in some detail, Magento 1.3: PHP Developer's Guide

Hope this pointer helps.