Magento导入产品与图像 [英] Magento import products with images

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

问题描述

我已经尝试所有下午进口一些产品在Magento,但都没有任何成功。试用和错误后,一切都下来了一个图像不存在的错误。我已经阅读了几个关于它的帖子,大部分都过时了,但最近一个一个谈到把一切都放在 / media / import 并在CSV文件中命名为 /image.png 的所有文件。



它不工作,我仍然得到相同的错误。



我使用Magento 1.6.2,

  /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


$ b

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

...和一组它们的组合首先,我使用了一个随机的方法,尝试论坛建议,但没有任何运气)。我试图找到的图像文件被检查的一块PHP代码,但失败...再次。



所以,进口商查找文件夹无论如何?这样做的方式是什么?有很多人有同样的问题,它似乎没有任何官方的解决方案。任何帮助赞赏。

解决方案

我将图像转换为媒体/导入,然后在实际的CSV文件, /image.jpg。



这是我的工作导入CSV文件的示例。我写了一个php脚本来哈希数据库,然后提供我们的目录,并组装以下输出。它确实需要大量的试验和错误,使其工作。在尝试导入之前做一个 mysqldump ,这样你就可以消除恢复的错误。

 sku|price|special_price|brand|weight|cost|name |section|description|short_description|make|fitment|product_name|store|websites|attribute_set|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| |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|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恤Cycleworks Brand Gear! ||Ca Cycleworks Lg黑色棉longsleeve标志T恤Cycleworks品牌齿轮!为Ducati Everyone| Ducati每个人|其他配件|简单|0|简单|使用配置||阻止在信息列之后||||无布局更新||目录,搜索|是|否|是|||1.0000|0.0000|1|0|0 |1|1.0000|1|0.0000|1|1||1|0|1 |0.0000|1|0|0|简单||||/tee_sm.jpg /tee_th.jpg
LANYARD|2.27|2.00|0.05|1.05|Ca Cycleworks Cycleworks挂绳Cycleworks品牌齿轮!!| Cycleworks系列为Ducati Everyone| Ducati Everyone|||||||| |禁止后信息列||||没有布局更新||启用| Yes|No|Yes|||1.0000|0.0000|1|0| 1.0000|1|0.0000|1|1||0|1|0| 1|0|0|简单||/|/ _ sm|/ _ th
PVC TAPE |13.64|12.00|0.50|1.05|Ca Cycleworks白色pvc鸭皮带 - 所有4个窗格 - 2in x 110yds Cycleworks品牌齿轮!鸭皮带 - 所有4窗格 - 2in x 110yds Cycleworks品牌齿轮!为Ducati Everyone| Ducati每个人|其他配件|简单|其他配件| 0|使用配置||||||||无|目录,搜索|是|否|是||||||1.0000|0.0000 |0|1|1.0000|1|0.0000|1|1| |1|0.0000|1|0|0|simple|||/ ductape_sm。 jpg|/ductape_th.jpg


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.

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

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

...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.

解决方案

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

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天全站免登陆