• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPArena

WPArena

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

  • News
    • Opinion
  • Tutorials
  • Reviews
    • Themes
    • Plugins
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Services
WPArena » Tutorials
Tutorials

How To Integrate Magento into WordPress eCommerce site

Avatar of Noor Mustafa Raza Noor Mustafa Raza Updated: July 12, 2018

FacebookTweetPinLinkedInEmailPrint

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 website. Building an online store Powered by WordPress has many benefits. First of all, WordPress is a Search Engine friendly platform, whenever you make a 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.

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:

WordPress Magento 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.

Magento WordPress Integration tab

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

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

Magento WordPress Integration tab3

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

Magento WordPress Integration tab4

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 top links 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 separated SKUs into the field provided in the post/page editors.
  • Use the options provided 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 sidebar.
  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 instance, if you are using the modern theme, just enter modern. 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 accurately 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 provides little PHP snippets that you can then 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.
More Info & Download

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 easiest, fastest and doesn’t require a ton of steps like some of the others do. Here is our guide to Integrate WordPress blog into e-Commerce Magento Website

This post was orginally published on: September 9, 2011 and was updated on: July 12, 2018.
FacebookTweetPinLinkedInEmailPrint

Related Stories

  • How To Make Your WordPress Blog More Readable

    How To Make Your WordPress Blog More Readable

  • How to Create Special Text Areas with CSS in WordPress Post

    How to Create Special Text Areas with CSS in WordPress Post

  • How to Add TrackBack URIs in WordPress blog post

Avatar of Noor Mustafa Raza

Noor Mustafa Raza

Ex-Editor in chief

I am a WordPress Developer and Designer, author @WPArena. I am providing Free WordPress consultation and can help you to install WordPress in a secure way to small businesses and bloggers.

Reader Interactions

Join the Discussion
  1. Avatar of SangitaSangita says

    November 13, 2017

    hello sir,
    i m the beginner of web designing sector.
    i’m going to create my own website.
    eCommerce site for some customer
    i want to create a total stock info of shop like ordering & remaining stock in shop.
    with display of clothing prices with discounts & payments options.
    give me some basics ideas to fulfill all requirements of customers.
    i will be great-full if u provide me such kind of info’s regarding.

    Reply

Share Your Thoughts Cancel reply

Before submitting your comment, we kindly ask that you read our comment policy. Your email address will remain confidential and will not be published or shared anywhere. If you subscribe, you will receive notifications regarding new comments.

Primary Sidebar

Creative website designs powered by WordPress

Creative Website Designs Powered by WordPress

wordpress logo in a sea

4 Tips on Building an Effective Intranet Website Using WordPress

Recent Topics

  • 27 Top SEO Companies in the World
  • 12 Ways To Monetize Your WordPress Blog
  • Comparing the Best Employee Engagement Software in the Market
  • Stellar Converter for OST Review: Best Tool for OST to PST Conversion
  • How To Use WordPress as an eCommerce Store

Footer

Top

  • Services
  • Our Themes
  • Facebook
  • Twitter
  • Linkedin

Reviews

  • Beaver Builder Review
  • Beaver Themer Review
  • WP User Frontend Pro
  • Ninja Forms Review
  • MemberPress Review

More Reviews »

Resources

  • Best WordPress Plugins
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files
  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact

Copyright © 2023 · All Rights Reserved · WPArena is a Project of TechAbout LLC.
We are not affiliated with Automattic or WordPress.

  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact
Share this ArticleLike this article? Email it to a friend!

Email sent!