3

我是 Magento 的新手,并且对支持它的 MVC 框架印象深刻,这使得模块开发成为一个经过深思熟虑的解决方案。我是强大的 CakePHP 开发人员。

我正在开发一个使用 dropshipper 运送实体产品的项目。因此,每天凌晨 4 点需要解析提要并修改产品/类别以及库存信息。将设置一个 CRON 来执行此操作。

附加要求是:订单成功后,系统必须通过 FTP 将 CSV 提要上传到 Dropshipper,其中包含订单详细信息以进行分发。实时库存检查,通过 CRON 每小时或在产品页面上查找

我可以想到两种方法:

  1. 将所有内容本地写入 Magento。作为一个新手,这将是一个很大的学习曲线,但这是正确的解决方案吗?

  2. 编写一个作为 shell 运行的简单 CakePHP 应用程序。这将使用 Magento API 来管理所有 dropshipper 进程。此解决方案将更容易推出,但引入了一个额外的系统来支持。

有人对 Magento 中的代发货有什么建议吗?

4

2 回答 2

1

首先,关于产品导入(产品、库存数据),请务必在 Magento 内部进行真实数据保存。过去对目录实现进行了更改,并且可能使用像 Magento 这样的框架会有更多变化。将其保留在框架内将减少它不再运行以及您接到非常不愉快的电话的可能性。

这种方法的另一个优点是,与 API 方法相比,本机代码不会尝试为每个请求启动整个框架。这是昂贵的,应该避免。根据产品的数量,您可能需要在保存目录产品时将脚本拆分为多个执行,因为内存泄漏。

不要将库存支票与目录页面视图联系起来。一些网络爬虫会来吃你的午餐。

最后,Magento 中没有内置简单的 FTP 库,但是将它放在另一个 cronjob 上并使用系统调用来执行实际的 (S)FTP 调用可能是您最简单的选择。

希望有帮助!

谢谢,乔

于 2010-08-27T12:34:32.347 回答
0

I think the answer to this question is simple. Write it in what you know. The biggest reason is "UPGRADES"... with Magento being as high profile, the possibility of being hacked with older versions increase every day. Therefore, when they release new versions, you are going to want to upgrade. With that in mind, are you going to want to add all of your changes into each new version as it is released? Probably not. If there is a solution to write this as a separate tool, that is what you should do.

PROS TO BUILDING OUTSIDE OF MAGENTO

  • No need to re-integrate the upgrades every time a new version of Magento is released.
  • Code is easier to maintain.
  • Tool is easier to write in something you are familiar with.
  • No learning curve.
  • Integration speed will be much quicker.
  • More flexibility since you do not have to fit inside Magento code limitations.
于 2010-08-27T13:13:01.377 回答