从CSV导入Magento中的可配置产品

时间:2012-10-31 15:30:31

标签: magento-1.7 magento magmi

我正在尝试将复杂数据附加到Magento ver中的数据库产品中。 1.7.0.2,有些是简单的,其他可配置的。导出的Magento CSV不满足导入需求。 我有这个文件用于导入数据:

    sku,_store,_attribute_set,_type,_category,_root_category,_product_websites,price,special_price,special_from_date,special_to_date,image,media_gallery,news_from_date,news_to_date,url_key,url_path,minimal_price,visibility,custom_design,custom_layout_update,page_layout,options_container,required_options,has_options,image_label,small_image_label,thumbnail_label,created_at,updated_at,enable_googlecheckout,gift_message_available,is_imported,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,msrp,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,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,_links_related_sku,_links_related_position,_links_crosssell_sku,_links_crosssell_position,_links_upsell_sku,_links_upsell_position,_associated_sku,_associated_default_qty,_associated_position,_tier_price_website,_tier_price_customer_group,_tier_price_qty,_tier_price_price,_group_price_website,_group_price_customer_group,_group_price_price,_media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled,_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr
"1202012000009S_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,/t/n/tn_1202012000009-1_1.jpg,,,,camiseta-freesoul,camiseta-freesoul.html,,1,,,,""Bloque después de la columna de Información"",0,0,""Camiseta Freesoul"",""Camiseta Freesoul"",""Camiseta Freesoul"",""2012-10-05 08:41:01"",""2012-10-05 12:07:06"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1.jpg,""Camiseta Freesoul"",1,0,,,,"
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,"
"1202012000009M_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-58.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 08:41:51"",""2012-10-05 12:07:39"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"
",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,"
"1202012000009L_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-59.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 08:43:19"",""2012-10-05 12:08:03"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"
",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,"
"1202012000009XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-60.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 08:44:34"",""2012-10-05 12:08:29"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"
",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,"
"1202012000009XXL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-61.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 11:39:42"",""2012-10-05 12:08:52"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"
",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,"
"12020120000093XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,""Default Category"",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-62.html,,1,,,,""Bloque después de la columna de Información"",0,0,/,/,/,""2012-10-05 11:41:45"",""2012-10-05 12:09:15"",1,,No,,""Usar configuración"",""Usar configuración"",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1_1.jpg,""Camiseta Freesoul"",1,0,,,,"
",espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1_1.jpg,""Camiseta para hombre Freesoul"",2,0,,,,"
"1202012000009_freesoul,,PartesDeArriba_Hombre,configurable,Hombre/Camisetas,""Default Category"",base,45.0000,,,,/t/n/tn_1202012000009-1_3.jpg,,""2012-10-04 00:00:00"",,camiseta-freesoul-conf,camiseta-freesoul-conf.html,,4,,,,""Bloque después de la columna de Información"",1,1,,,,""2012-10-05 11:59:13"",""2012-10-10 11:02:47"",1,,No,,""Usar configuración"",""Usar configuración"",,0.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_3.jpg,,1,0,1202012000009S_freesoul,tallacamisetas_h,S,

我收到了这个错误:

Product Type is invalid or not supported in rows: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
Product with specified super products `SKU` not found in rows: 14

如果试过这件事就可以了:

  • SKU是必需的,我看到有些行没有它们,试图导入其他类型不正确的行。
  • 我已将CSV转换为utf-8,错误仍在继续
  • 我已经更改了列名“”并且无法正常工作
  • 我使用了Magmi,当runnig导入文件时出现此错误:SQLSTATE[28000] [1045] Access denied for user '<>'@'localhost' (using password: YES)

修改 在我尝试从CSV导入时正确配置Magmi后,文件路径出现问题并收到此错误:

C:wampwwwmagentoarimport/myfile.csv not found - 

问题是路径缺少“/”,因为它应该是:

C:wamp/www/magento/var/import/myfile.csv

我该如何解决这个问题?

3 个答案:

答案 0 :(得分:6)

如果这是CSV的最新版本,那么问题将取决于报价的完成方式。如果在电子表格应用程序中打开文件,该文件看起来如何?我觉得它看起来不像你期望的那样。

我删除了无关的引号,但看起来你的列数也有问题,请尝试下面的版本,你会看到我的意思。我建议你在电子表格应用程序中查看该文件,你会看到我的意思

sku,_store,_attribute_set,_type,_category,_root_category,_product_websites,price,special_price,special_from_date,special_to_date,image,media_gallery,news_from_date,news_to_date,url_key,url_path,minimal_price,visibility,custom_design,custom_layout_update,page_layout,options_container,required_options,has_options,image_label,small_image_label,thumbnail_label,created_at,updated_at,enable_googlecheckout,gift_message_available,is_imported,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,msrp,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,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,_links_related_sku,_links_related_position,_links_crosssell_sku,_links_crosssell_position,_links_upsell_sku,_links_upsell_position,_associated_sku,_associated_default_qty,_associated_position,_tier_price_website,_tier_price_customer_group,_tier_price_qty,_tier_price_price,_group_price_website,_group_price_customer_group,_group_price_price,_media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled,_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr
1202012000009S_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,/t/n/tn_1202012000009-1_1.jpg,,,,camiseta-freesoul,camiseta-freesoul.html,,1,,,,"Bloque después de la columna de Información",0,0,"Camiseta Freesoul","Camiseta Freesoul","Camiseta Freesoul","2012-10-05 08:41:01","2012-10-05 12:07:06",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1.jpg,"Camiseta Freesoul",1,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,
1202012000009M_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-58.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 08:41:51","2012-10-05 12:07:39",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,
1202012000009L_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-59.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 08:43:19","2012-10-05 12:08:03",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,
1202012000009XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-60.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 08:44:34","2012-10-05 12:08:29",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,
1202012000009XXL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-61.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 11:39:42","2012-10-05 12:08:52",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,
12020120000093XL_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,"Default Category",base,45.0000,,,,no_selection,,,,camiseta-freesoul,camiseta-freesoul-62.html,,1,,,,"Bloque después de la columna de Información",0,0,/,/,/,"2012-10-05 11:41:45","2012-10-05 12:09:15",1,,No,,"Usar configuración","Usar configuración",,5.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_1_1_1_1_1_1.jpg,"Camiseta Freesoul",1,0,,,,,espanol,,,,,,,,,,,,,,,camiseta-freesoul.html,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-2_1_1_1_1_1_1.jpg,"Camiseta para hombre Freesoul",2,0,,,,
1202012000009_freesoul,,PartesDeArriba_Hombre,configurable,Hombre/Camisetas,"Default Category",base,45.0000,,,,/t/n/tn_1202012000009-1_3.jpg,,"2012-10-04 00:00:00",,camiseta-freesoul-conf,camiseta-freesoul-conf.html,,4,,,,"Bloque después de la columna de Información",1,1,,,,"2012-10-05 11:59:13","2012-10-10 11:02:47",1,,No,,"Usar configuración","Usar configuración",,0.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,1,,1,0,1,0,1,0.0000,1,0,0,,,,,,,,,,,,,,,,,73,/t/n/tn_1202012000009-1_3.jpg,,1,0,1202012000009S_freesoul,tallacamisetas_h,S,

至于magmi问题,看起来你还没有正确设置全局参数。确保在配置页上指定了用户名和密码,单击“保存全局参数”按钮。

如果设置正确且您仍然遇到问题,那么我认为这将是一个MySQL权限问题

答案 1 :(得分:4)

您应该检查不同的选项:

  1. Magmi link
  2. 选中video
  3. 选中manual
  4. 另一个有意义的manual

答案 2 :(得分:0)

您可以使用MAGMI轻松输入可配置产品。

Here,如果您点击“下载CSV示例”标签,您可以看到格式示例,还可以查看“基本表”和“可配置产品”部分,然后点击下载并获取您可以参考的与MAGMI兼容的导入文件。

注意:您需要启用MAGMI插件“可配置产品”并进行一些微调,以便将此类CSV正确地提供给MAGMI。

你也可以使用上面链接提供的插件,因为它基本上是一个MAGMI与Magento管理员的集成,带有一些扩展的附加功能