Title: [Plugin: Mage Enabler] Same database?
Last modified: August 19, 2016

---

# [Plugin: Mage Enabler] Same database?

 *  Resolved [webdesignby](https://wordpress.org/support/users/websitedesignby/)
 * (@websitedesignby)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-mage-enabler-same-database/)
 * Do WordPress and Magento have to use the same database?
 * I have mage-enabler successfully installed. I add an item to my shopping cart
   on the Magento site.
 * When I run this code in WordPress
 *     ```
       $cart = Mage::helper('checkout/cart')->getCart()->getItemsCount();
                                   echo "<pre>";
                                   print_r($cart);
                                   echo "<pre>";
       ```
   
 * It returns 0
 * Did not see anything in any of the instructions saying it has to use the same
   database but I am wondering if this is the reason.

Viewing 1 replies (of 1 total)

 *  Thread Starter [webdesignby](https://wordpress.org/support/users/websitedesignby/)
 * (@websitedesignby)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-mage-enabler-same-database/#post-2036368)
 * Never mind. I got it. Magento and WordPress do NOT have to be using the same 
   database.
 * My issue was I did not have
 *     ```
       if(class_exists('Mage')){
           Mage::getSingleton('core/session', array('name' => 'frontend'));
        }
       ```
   
 * above get_header(); in my template file.
 * Great plug-in. Thanks!

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Mage Enabler] Same database?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mage-enabler.svg)
 * [Mage Enabler](https://wordpress.org/plugins/mage-enabler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mage-enabler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mage-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/mage-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mage-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mage-enabler/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [webdesignby](https://wordpress.org/support/users/websitedesignby/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-mage-enabler-same-database/#post-2036368)
 * Status: resolved