通过远程 FTP 文件进行每日库存更新
已经过去 2 天了,我看到了很多教程、视频和扩展,它们解释了如何对我的产品进行日常更新,但似乎都不起作用。
我有一个网站,其中包含大约 3,000 种具有属性的产品。我的供应商每天更新库存文件,更新后的库存文件保存在我有权访问的远程 ftp 上。
我需要的是以下内容:
- 每日库存更新,其中包括价格、数量等
- 删除数量为 0 的商品
- 根据更新的库存文件添加新商品
我确信有人已经回答了我的问题。所以请尽快回复我。
It’s been 2 days and I came across many tutorials, videos, extension which explains how to do daily updates on my products but none of them seem to work.
I have a website which has around 3,000 products with attributes and all. My supplier updates the inventory file on daily basis and the updated inventory file is kept on a remote ftp to which I have access to.
What I need is the following:
- Daily inventory update which will include, prices, quantity, etc
- Remove items which has quantity 0
- Add new items as per the updated inventory file
I am sure someone out there has answer to my questions. So please get back to me asap.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,通过“删除数量为 0 的商品”,我认为您的意思是当库存减少到 0 时将产品设置为“缺货”。这是在您更新库存后由 Magento 自动处理的。
内置的导入/导出功能应该可以满足您的要求。
如果你不介意的话,还有一些教程:
教程:使用 Magento 的导入/导出配置文件
如何使用导入/导出工具添加/编辑/删除产品
Fisrt, by "Remove items which has quantity 0", I think you mean to set products as "out of stock" when the inventory is decreased to 0. This is handled automatically by Magento after you update the inventory.
The built-in import/export function should fulfill your requirements.
Some more tutorials if you don't mind:
Tutorial: Using Magento’s Import/Export Profiles
How to add/edit/remove products using the import/export tool
在这里,我将只分享库存更新(但这不是好方法)。您应该创建“制表符分隔”文件,如下所示:
SKU 数量
978 34
633 0
然后您可以创建 cron 作业来运行此脚本。
该脚本由 Deepcodeonline
Here, I will share just inventory update ( but this is not good way ). You should create "tab delimited" file as follows :
SKU QTY
978 34
633 0
Then you can create cron job to run this script.
The script by courtesy of the Deepcodeonline