How to integrate Magento into WordPress e-Commerce site

Nur . Posted in How-To, Plugins 1353 Views

Magento is the best eCommerce software, well architected and well designed too. You can easily customize it and change theme according to your needs. I have compiled a list of Great Themes for Magento. Over 60,000 merchants worldwide use Magento to power their ecommerce front.

WordPress is becoming the great platform for setting up your online eCommerce web site. Building online store Powered by WordPress has many benefits. First of all WordPress is a Search Engine friendly platform, whenever you make new post, it will automatically ping the search engines and these pages are easily indexed.  So WordPress reduces your SEO’s cost, as well help your eCommerce site to have more visitors that’s mean more money for you – Detail.

In case if you are using Magento as an e-commerce engine but want to use the power of WordPress’s CMS, then you’ll be happy to learn that the two can now be easily integrated.

Magento WordPress Integration:

The Magento WordPress Integration plugin is well known as a Wordgento, which give you to add any of the default Magento Blocks into your WordPress theme – for example, the shopping cart, top links, top navigation, and more. You can also add any number of Magento products to your WordPress posts and pages.

The Initial Setup Tab.

The tab where you can choose which CSS/JS to load into your WordPress theme.


The tab that allows you to add any number of custom Magento Blocks.

The tab that allows you to style the products that have been added to a WordPress post or page.

The Magento WordPress Integration Plugin allows you to to the following:

  • Bring out any of the default Magento Blocks in your WordPress theme.
  • Bring out any Magento blocks that you have created yourself.
  • Bring out any static blocks that you have made in your Magento admin area.
  • Choose which toplinks to show (if you are using that block).
  • Choose which javascript and css files to load in your WordPress theme.
  • Add additional javascript and css files from you Magento installation.
  • Show Magento products on a WordPress post or page by entering a list of comma seprated SKUs into the field provided in the post/page editors.
  • Use the options provide in the plugin settings to style the products that are shown on posts/pages.

If upgrading, please back up your database first!

Installation


Before installing, please make sure you don’t have any other plugins that load in Magento – as it can create conflict. It is not a simple and easy way to use this plugin for detail installation visit the plugin’s homepage and get the complete instructions.

  1. Deactivate a Magento function that conflicts with one in WordPress.
    1. Navigate to ~/your-magento/app/code/core/Mage/Core/functions.php
    2. Duplicate that file and place the new version in ~/your-magento/app/code/local/Mage/Core/functions.php – this file will now be used over the original, and will remain during Magento upgrades.
    3. Open the newly created file and browse to around line 90, where you will find this:
      function __()
      {
      return Mage::app()->getTranslator()->translate(func_get_args());
      }
    4. Replace the above line with:
      if(!function_exists('__')) {
      	function __()
      	{
      	return Mage::app()->getTranslator()->translate(func_get_args());
      	}
      }
    5. Upload the file to your server, and you are done!

Now that we have that out the way, let’s move on to the good stuff. You can either download the plugin manually from the WordPress Plugin Directory, or browse to Plugins » Add New in your WordPress admin area, then search for “Magento WordPress Integration”.

  1. Install the plugin as described above.
  2. Activate the plugin. There will be a message reminding you to remove the __() function from Magento. If you have already done so, please ignore the message.
  3. Click Mage/WP in your side bar.
  4. Under the Initial Setup tab, you will need to enter the details of your Magento store.
    1. The first field requires the path to your Magento installation – this needs to be on the same domain as your WordPress installation, and must be entered from the root (i.e. it will start with a forward slash – for example: /shop).
    2. The second field requires the name of Magento theme or package – For example, if you are using the modern theme, just entermodern. If you have installed a new package, then enter package-name/theme-name.
    3. The third field needs to be the store view code of the Magento store that you want to get blocks and data from. If you haven’t specifically renamed or made any new Magento store views, then just leave this as default.
  5. Once you have done the above, you can move on the other tabs. Each of these tabs contains usage instructions and should be pretty workable.

Installation Tips

Setting the cookie paths in Magento can help to solve any issues regarding customer session data between platforms – Go to your Magento admin area. Navigate to System » Configuration » Web » Session Cookie Management. Set the Cookie Path to / and the Cookie Domain to .yourdomain.com.

Usage

Usage instructions can be found in the settings under each tab, there is also a tab entitled Usage, which describes how to bring out the default Magento blocks.

The plugin basically provides little PHP snippets that you can the use in your WordPress theme to bring out the required blocks. For example:

<?php echo jk_mwi('welcome'); ?>

The above will echo the Magento welcome message.

Download | Detail

WordPress into Magento

The other way to integrate is to get your WordPress content and variables onto your Magento pages. I’ve seen several different approaches to this, but I’m going to stick with my favorite way, because its the easiest, fastest and doesn’t require a ton of steps like some of the others do. Detail

Nur

I am a Wordpress, Website Developer and Designer, creator @ WP Arena, Provide Free WordPress consultation and can help to install WordPress in a secure way to small businesses and bloggers.

Free & Professional WordPress Security Service Free & Professional WordPress Security Service

We Love WordPress. WordPress Arena is a place for WordPress Developers and Designers, providing Tips, tricks, tools and resources to build a website or blog on WordPress. We also present The WordPress Showcase for all kind of WordPress Powered Websites.

Recent Comments

Anderson

|

Dont work with post_type? ‘post_type=property&numberposts=1′