Magento 可以与 CakePHP 集成吗? 如果我的网站是用CakePHP开发的。我可以在Magento中做包括购物车在内的产品模块吗?
最佳答案
是的,可以。例如:
require_once 'app/Mage.php';
umask(0);
Mage::app();
Mage::getSingleton('core/session', array('name'=>'frontend'));
$cart = Mage::helper('checkout/cart')->getCart()->getItemsCount();
echo 'Items count: ' . $cart;
看看这些文章:
http://www.exploremagento.com/magento/run-magento-code-outside-of-magento.php
http://blog.chapagain.com.np/magento-how-to-run-magento-code-in-an-external-website/
关于cakephp - Magento 可以与 CakePHP 集成吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6121923/