Magento 可以与 CakePHP 集成吗?
Magento 可以与 CakePHP 集成吗? 如果我的网站是用CakePHP开发的。我可以在Magento中做包括购物车的产品模块吗?
Can Magento be integrated with CakePHP?
If my site is developed in CakePHP. Can I do the product module including shopping cart in Magento?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,可以。例如:
查看这些文章:
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/
Yes, it can. For example:
Look at these articles:
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/
可以通过上面的示例使 Mage 类在纯 php 代码中为我工作。但你知道Cakephp有它自己的路由机制。我在根目录中安装了 magento,并尝试添加另一个用 cakephp 构建的应用程序 - 该应用程序有自己的数据结构和数据结构。数据库(主要用于自定义报告和一些跟踪内容),但会共享来自 magento(这是主站点)的一些数据
can make the Mage class working for me in pure php code with the above example. But you know Cakephp has its own routing mechanism. I have magento installed in the root and trying to add another application built with cakephp - that application has its own data structure & database (mainly be used for custom reporting and some tracking stuffs) but will share some data from magento (that is the main site)
我设法进行了黑客攻击(没有其他方法可以做到这一点)。
技巧是你需要将“function __()”放在Magento app/code/core/Mage/Core/functions.php的第93行中,
并且你需要对“DS”做同样的事情” 在 app/Mage.php 第 23 行
,那么你可以只使用 Mage 类并对 Megento 执行所有操作。
I managed to do a hack (and there where no other way to do that).
The hack is you need to put the "function __()" inside in line 93 of Magento app/code/core/Mage/Core/functions.php
and you need to do the same for "DS" in app/Mage.php line 23
then you can just use the Mage class and do all the operation to Megento.