Magento 产品从 csv 文件导入
我想从我的 csv 文件导入 Magento 产品,但是当我导入此 csv 文件时,我收到这样的错误(跳过导入行,未定义必填字段“sku”)但是,我在 csv 文件中定义了此字段。
如果有人对此有任何想法,请告诉我。我应该遵循哪种方法将我的 csv 产品导入 Magento
提前感谢您的帮助
I want to import Magento products from my csv file, but when I import this csv file I get an error like this ( Skip import row, required field "sku" not defined) However, I had this field defined in my csv file.
If any one has any idea about that then please advise me. Which method should I follow to import my csv products to Magento
Thanks for help in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这个解决方案非常简单:
只需转到系统->导入/导出,然后通过 csv 导出所有产品
现在在 csv 中输入您需要的所有其他字段或属性数据。
$product = Mage::getModel('目录/产品');
$product->setSku($data[5]);
$product->setName($data[7]);
。
。
。
尝试 {
$产品->保存();
回声'
您好,产品已成功保存在 magento uniqe 移动商店中';
}
捕获(异常$ex){
echo '处理错误';
}
}// if 语句存储结束
}// while 循环结束
fclose($句柄);
?>
使用此代码并设置所有产品,但所有字段均根据您的 CSV 文件设置。然后运行这段代码。
我测试了这段代码,它的工作原理。这是我自己的创作
I find this solution its very simple:
just go to system->import/export and then u export all product by csv
now enter all other fields or attribute data in csv which u required.
use this code and set all products but all fields set acourding to ur CSV file. then run this code .
its working i test this code. its my own creation