Home » Magento14 February 2011

Magento: How to run Magento code in an external website?

Suppose you have a Magento shop installed. You also have another php installation in your server (may it be wordpress, joomla, drupal, or any other php code system).

Now, you want to get Magento shop data in your external website which is not Magento. So, how to do this?

It’s simple. You just need to include ‘app/Mage.php‘ of your Magento installation into your new system code. Then, you can code as you do in Magento.

In the example below, I will be fetching Product and Customer data from Magento shop in my external site.

Hope this helps. Thanks.

Magento

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Shiv

    Hey! u hv nice blogs…can u plz tell me tht hw cn i fetch data frm facebook after i hv appid of my website in magento and hw cn 1 store facebook profile information in my magento database??

  • Mhkdeveloper

    Is it possible to get one magnto domain site data into another magento domain site.
    Magento installed both domain and I want to get one magento domain data into another magento doamin site.

  • I tried call mage.php in cakephp.. but i found a problem ;/ the constants and class, or whatever is getting a conflict ;/

    Notice (8): Constant DS already defined [ROOT/loja/app/Mage.php, line 27]Fatal error: Cannot redeclare __() (previously declared in /var/www/iassete/lib/Cake/basics.php:488) in /var/www/iassete/loja/app/code/core/Mage/Core/functions.php on line 96

  • I tried call mage.php in cakephp.. but i found a problem ;/ the constants and class, or whatever is getting a conflict ;/

    Notice (8): Constant DS already defined [ROOT/loja/app/Mage.php, line 27]Fatal error: Cannot redeclare __() (previously declared in /var/www/iassete/lib/Cake/basics.php:488) in /var/www/iassete/loja/app/code/core/Mage/Core/functions.php on line 96