Magento Dropshipping - 如何自动更新目录?

发布于 2024-09-16 16:13:58 字数 522 浏览 5 评论 0原文

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

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

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

我可以想到 2 种方法:

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

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

有人对 Magento 中的直销有建议吗?

I am new to Magento and impressed by the MVC framework that powers it, making module development a well thought out solution. I am strong CakePHP developer.

I am working on a project that uses a dropshipper for the physical products. As a result, every day at 4am a feed needs to be parsed and the products / categories modified, plus stock information. A CRON will be setup to do this.

Additional requirements are:
Upon a sucessful order, the system must upload a CSV feed to the Dropshipper via FTP with the order details for distribution.
Realtime stock checks, either every hour by CRON or a lookup on the product page

I can think of 2 approaches:

  1. Write everything natively into Magento. As a newbie, this is going to be a big learning curve, but it is the right solution?

  2. Write a simple CakePHP app that runs as a shell. This will use the Magento API to manage all dropshipper processes. This solution will be easier to rollout but introduces an additional system to support.

Does anyone have an advice relating to dropshipping in Magento?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

焚却相思 2024-09-23 16:13:58

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

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

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

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

希望有帮助!

谢谢,

First, with respect to the product import (product, stock data), make sure to do the real data saving inside of Magento. There have been changes to the catalog implementation in the past, and it's likely with a framework like Magento that there will be more. Keeping it inside the framework will reduce the likelihood of it simply no longer operating and you getting a very unpleasant phone call.

Another advantage to this approach is that, in contrast to the API approach, the native code will not try to spin up the entire framework for every request. This is expensive and to be avoided. Depending on how many products there are, you may need to break the script into multiple executions due to memory leaks when saving catalog products.

Don't tie the stock checks to a catalog page view. Some web crawler will come eat your lunch.

Finally, there's no easy FTP library built into Magento, but throwing that on another cronjob and using system calls to perform the actual (S)FTP call is possibly your easiest option.

Hope that helps!

Thanks,
Joe

迷鸟归林 2024-09-23 16:13:58

我认为这个问题的答案很简单。把你知道的写下来。最大的原因是“升级”……随着 Magento 的高调,旧版本被黑客攻击的可能性与日俱增。因此,当他们发布新版本时,您会想要升级。考虑到这一点,您是否希望在每个新版本发布时将所有更改添加到其中?可能不会。如果有一个解决方案可以将其编写为单独的工具,那么这就是您应该做的。

在 MAGENTO 之外进行构建的优点

  • 无需重新集成升级
    每次 Magento 新版本出现时
    被释放。
  • 代码更容易维护。
  • 工具更容易编写一些东西
    你熟悉。
  • 没有学习曲线。
  • 集成速度会快很多
    更快。
  • 更加灵活,因为您不
    必须适合 Magento 代码
    限制。

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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文