Magento 导入带有图像的产品 [英] Magento import products with images

查看:24
本文介绍了Magento 导入带有图像的产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我整个下午都在尝试在 Magento 中导入一些产品,但都没有成功.经过反复试验,一切都归结为图像不存在"错误.我已经阅读了一些关于它的帖子,其中大部分已经过时,但是最近的一个一个谈到把所有东西都放进去/media/import 并在 CSV 文件中将所有文件命名为 /image.png.

I have tried all afternoon to import some products in Magento, but all without any success. After trial and errors it all came down an "Image does not exist" error. I have read a few posts about it, most of them outdated, but then a recent one talks about putting everything in /media/import and having all files named like /image.png in the CSV file.

它不起作用,我仍然遇到同样的错误.

It does not work and I still get the same error.

我使用的是 Magento 1.6.2,我尝试将文件放入

I'm using Magento 1.6.2 and I have tried putting the files in

/var/import/image.png
/var/import/i/m/image.png 
/media/import/image.png
/media/import/i/m/image.png
/media/catalog/product/i/m/image.png

我试图将 CSV 中的文件命名为

I have tried to name the file in the CSV as

/image.png
/1/m/image.png
/media/import/image.png
/media/import/i/m/image.png

...以及它们的一堆组合(我一开始不完全确定是哪些,因为我使用了随机方法,尝试了论坛建议的方法,但没有任何运气).我试图找到检查图像文件的 PHP 代码段,但失败了......再次.

...and a bunch of combination of them all (not exactly sure which ones as I used a random approach at first, trying what the forums suggested, but without any luck). I have tried to located the piece of PHP code where the image file is checked, but failed... again.

那么,无论如何,导入程序会在哪个文件夹中查找该文件?这样做的方法是什么?有很多人有同样的问题,似乎没有任何官方解决方案.任何帮助表示赞赏.

So, what folder does the importer looks for the file anyway? What is the way of doing this? There are a lot of people with the same problem and it does not seem to be any official solution for this. Any help appreciated.

推荐答案

我将图像 ftp 导入 media/import,然后在实际的 CSV 文件中,图像为/image.jpg.

I ftp'd the images into media/import and then in the actual CSV file, the image was /image.jpg.

这是我的工作导入 CSV 文件的示例.我编写了一个 php 脚本来散列数据库,该数据库提供我们当时的目录并组装以下输出.它确实需要大量的反复试验才能使其正常工作.在尝试导入之前执行 mysqldump,这样您就可以通过恢复消除错误.

Here is an example of my working import CSV file. I wrote a php script to hash the database which fed our then catalog and assemble the below output. It did take lots of trial and error to get it working. Do a mysqldump before you try importing so you can blow away mistakes with restores.

"sku"|"price"|"special_price"|"brand"|"weight"|"cost"|"name"|"section"|"description"|"short_description"|"make"|"fitment"|"product_name"|"store"|"websites"|"attribute_set"|"type"|"has_options"|"gift_message_available"|"custom_design"|"options_container"|"image_label"|"small_image_label"|"thumbnail_label"|"page_layout"|"meta_keyword"|"custom_layout_update"|"manufacturer"|"color"|"status"|"tax_class_id"|"visibility"|"enable_googlecheckout"|"is_recurring"|"is_imported"|"special_to_date"|"custom_design_from"|"custom_design_to"|"news_from_date"|"news_to_date"|"qty"|"min_qty"|"use_config_min_qty"|"is_qty_decimal"|"backorders"|"use_config_backorders"|"min_sale_qty"|"use_config_min_sale_qty"|"max_sale_qty"|"use_config_max_sale_qty"|"is_in_stock"|"low_stock_date"|"notify_stock_qty"|"use_config_notify_stock_qty"|"manage_stock"|"use_config_manage_stock"|"stock_status_changed_automatically"|"use_config_qty_increments"|"qty_increments"|"use_config_enable_qty_increments"|"enable_qty_increments"|"store_id"|"product_type_id"|"product_status_changed"|"product_changed_websites"|"material"|"category_ids"|"image"|"small_image"|"thumbnail"
"TEE BLACK LONG LG"|"28.41"|"25.00"|""|"0.60"|"12.15"|"Ca Cycleworks Lg black cotton longsleeve logo t-shirt Cycleworks Brand Gear!!"|""|"Ca Cycleworks Lg black cotton longsleeve logo t-shirt Cycleworks Brand Gear!! for Ducati Everyone"|" Ducati Everyone"|""|""|"Ca Cycleworks Lg black cotton longsleeve logo t-shirt Cycleworks Brand Gear!!"|"admin"|"base"|"Other Accessories"|"simple"|"0"|"Use config"|""|"Block after Info Column"|""|""|""|"No layout updates"|""|""|""|""|"Enabled"|"None"|"Catalog, Search"|"Yes"|"No"|"Yes"|""|""|""|""|""|"1.0000"|"0.0000"|"1"|"0"|"0"|"1"|"1.0000"|"1"|"0.0000"|"1"|"1"|""|""|"1"|"0"|"1"|"0"|"1"|"0.0000"|"1"|"0"|"0"|"simple"|""|""|""|"36"|"/tee.jpg"|"/tee_sm.jpg"|"/tee_th.jpg"
"LANYARD"|"2.27"|"2.00"|""|"0.05"|"1.05"|"Ca Cycleworks Cycleworks lanyard Cycleworks Brand Gear!!"|""|"Ca Cycleworks Cycleworks lanyard Cycleworks Brand Gear!! for Ducati Everyone"|" Ducati Everyone"|""|""|"Ca Cycleworks Cycleworks lanyard Cycleworks Brand Gear!!"|"admin"|"base"|"Other Accessories"|"simple"|"0"|"Use config"|""|"Block after Info Column"|""|""|""|"No layout updates"|""|""|""|""|"Enabled"|"None"|"Catalog, Search"|"Yes"|"No"|"Yes"|""|""|""|""|""|"1.0000"|"0.0000"|"1"|"0"|"0"|"1"|"1.0000"|"1"|"0.0000"|"1"|"1"|""|""|"1"|"0"|"1"|"0"|"1"|"0.0000"|"1"|"0"|"0"|"simple"|""|""|""|"36"|"/"|"/_sm"|"/_th"
"PVC TAPE"|"13.64"|"12.00"|""|"0.50"|"1.05"|"Ca Cycleworks White pvc duck tape - all 4 panes - 2in x 110yds Cycleworks Brand Gear!!"|""|"Ca Cycleworks White pvc duck tape - all 4 panes - 2in x 110yds Cycleworks Brand Gear!! for Ducati Everyone"|" Ducati Everyone"|""|""|"Ca Cycleworks White pvc duck tape - all 4 panes - 2in x 110yds Cycleworks Brand Gear!!"|"admin"|"base"|"Other Accessories"|"simple"|"0"|"Use config"|""|"Block after Info Column"|""|""|""|"No layout updates"|""|""|""|""|"Enabled"|"None"|"Catalog, Search"|"Yes"|"No"|"Yes"|""|""|""|""|""|"1.0000"|"0.0000"|"1"|"0"|"0"|"1"|"1.0000"|"1"|"0.0000"|"1"|"1"|""|""|"1"|"0"|"1"|"0"|"1"|"0.0000"|"1"|"0"|"0"|"simple"|""|""|""|"36"|"/ductape.jpg"|"/ductape_sm.jpg"|"/ductape_th.jpg"

这篇关于Magento 导入带有图像的产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆