我已经使用管理表单创建了新的自定义模块,例如创建新产品。我已经成功创建。一切都很好。但是现在我想在这个模块中再添加一个功能。我们可以通过 CSV 文件从system/import/export 导入产品。
像这样我如何通过 CSV 文件导入我的字段。我不知道要执行此任务。
那里(在导入下)我们有一个实体类型“产品和客户”。如果我添加我的实体类型就足够了吗?还是有其他解决方案?
This may not be a direct answer, but Magento comes with a CSV importing function under System -> Import/Export. It seems that you've already discovered this functionality. So, you could set up a custom import profile, let a customer upload a products.csv via your module and then call the import profile from this module.
Your products.csv has to provide Magento's attribute and values structure you'll see when you export products with the export functionality.
BUT: Magento's default importing functionalities are very limited. F.e. it is not capable of importing configurable products by default. We're using third party modules for these tasks.