Home » Magento eCommerce

Magento and Wordpress

28 June 2009 7 Comments

With the latest release of Magento 1.3, there really is no escaping the fact that Magento is the number one software for your eCommerce site. With it’s flexibility and scalability there is very little you can’t get Magento to do in an eCommerce environment. Granted, the CMS options could be and perhaps should be a bit more flexible compared to the rest, but they do the trick. There only one thing Magento can’t do and that is blog.

Where Magento is becoming the dominant software for eCommerce websites, is WordPress already the most popular blogging software out there, and with good reason. WordPress can be used in a number of different ways but using WordPress as CMS plus blog engine is what is does best.

icon_big

So if you’re serious about the online presence of your web shop you should want to take a look at combining Magento and WordPress.

Advantages of integrating Magento with WordPress

There are a couple of advantages of integrating Magento with WordPress:

- With WordPress added to your store you give your customers and regular visitors the ability to interact with you more than when you would just offer products.
- Instead of just offering products you have the possibility to offer extra value by providing interesting links of interest in your field, which in effect establishes you or your web shop as an authority on your subject.
- An added WordPress blog gives you the opportunity to work on your search engine optimization (SEO). Linking to your products in right way will not only make sure your visitors know what’s going on and what you find important but the Search Engines will know this just as well! To learn more about SEO visit this article on Magento SEO by Yoast.

Thing to consider when looking at integrating Magento with WordPress

Let’s say you’re still working on releasing your Magento website, or better yet when you have yet to install Magento. You will have to figure out what to do with your url and your installations of Magento and WordPress. Here are a couple of things to consider:

- Depending on the size of your shop you could install your Magento installation in a subfolder (http://www.yourdomain.com/shop) or sub domain even(http://shop.yourdomain.com) and let WordPress handle the root of your domain with it’s static pages and have the blog functionality work as your news section.
- When you have a larger shop you might want to install Magento in the root of your domain and use WordPress as a subfolder called /blog, /news or something of your choosing.
- Try and go for matching themes on your Magento and WordPress installation as much as possible.
- When you really want to create a large community combined with your web shop, do consider a variation of WordPress called BuddyPress. BuddyPress enables you to have your own social network combined with a large site. Although this may seem like a step too far in most cases this is definitely worth checking out when you are building a large online store.

How to integrate WordPress into your Magento store

Straight out of the box Magento can not communicate with WordPress and vice versa. So it’s up to you to make them share information. Right now there are two ways of going about that.

The first is immediately the easiest one. Lazymonk wrote a Magento extension for WordPress integration. This extension allows you to integrate WordPress into your Magento installation if, and only if both your installations are installed in the same database. For installation details check out the plugins page.

The second way of going about this involves you tweaking a bit of code in your Magento Theme. We’ll use the RSS import function of Magento to import the latest articles via your WordPress feed output.

What we need to do is create a file which will contain the code used to import the RSS. Let’s give that file a name something like import_blog.phtml and the following code into that:

< ?php $channel = new Zend_Feed_Rss('http://www.yourdomain/feed'); ?>
<div class="block block-latest-news">
<div class="block-title">
<h2>< ?php echo $this->__('Latest Articles form the Blog') ?></h2>
</div>
<div class="block-content">
<ol id="graybox-latest-news">
< ?php foreach ($channel as $item): ?>
<li><a href="<?php echo $item->link; ?>">< ?php echo $item->title; ?></a></li>
< ?php endforeach; ?>
</ol>
</div>
</div>

Place this file in your themes folder so it will look like so: app/design/frontend/default/name_of_your_theme/template/callouts/blog_import.phtml

All you would have to do is call for this newly created file in your Magento theme. Most themes have a column on the right so let’s assume that’s where you want to import your latest blog posts. You would need a code similar to this one:

<reference name="right">
<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/>
<block type="core/template" name="right.latest.news" template="callouts/blog_import.phtml"/>
</reference>

Be sure to add this code to your catalog.xml located in app/design/frontend/default/name_of_your_theme/layout/catalog.xml

Please note that in the code you can change things like Latest Articles from the Blog to anything you like. Also, for better handling and tracking of your feed you can use Feedburner to deliver your feed. You would then use the feed url specified by Feedburner in the first code.

Related posts:

  1. How to use WordPress home page in Magento home page (CMS page)
  2. connect2MAGE | WordPress plugin for easy Magento database connection
  3. How to Install Sample Data for Magento?
  4. Remove SID query from Magento URLs
  5. Adding Links to your Top Menu

7 Comments »

  • sunee said:

    That was a nice read.

  • ririn said:

    good information

  • maria said:

    good information to me

  • Flash said:

    Perfect!

  • GyncHinkHoona said:

    Hi, I used to use only

    google

  • Ecommerce development company India said:

    When starting a new ecommerce project, remember your website should be well designed to cater to the needs of your project and should hold a good search rank on different search engines.

  • Broderick said:

    Hello, I dont know how your blog came up, must have been a typo, Your blog looks awesome, I’ll be back :)

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree

Security Code: