CodeIgniter Forums
best way to load magento automatically with codeigniter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: best way to load magento automatically with codeigniter? (/showthread.php?tid=31918)



best way to load magento automatically with codeigniter? - El Forum - 07-06-2010

[eluser]lexusgs430[/eluser]
Hi all.

So Im creating a 2nd admin section using codeigniter for my website, to manage base level product data and link it up with my POS system among other things, and I need to include the magento app.Mage.php - Im wondering if anyone would know the easiest way to do this automatically, I can do it from the view and it works fine. But I tried doing it by creating a library called "Magento.php" with the same code in it, and autoloading it, and go hella error message.

Code:
require_once('../app/Mage.php'); //Path to Magento
umask(0);
Mage::app('default');

Any help appreciated.