【问题标题】:Undefined index: _attribute_set in magento product csv import from admin未定义的索引:magento 产品 csv 中的 _attribute_set 从管理员导入
【发布时间】:2014-06-05 04:57:31
【问题描述】:

我正在从 magento 管理员导入产品 csv,然后当我在检查数据后单击导入按钮时显示错误。

通知:未定义索引:_attribute_set in /home/deleshop/public_html/v2/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php 在第 1394 行

部分产品样本数据为:

"sku","manufacturer_code","model","type_code","kba","category_code","mounting_space","part_number","reference_number","designation","custom_thumbnail","custom_image","price","note1","note2","supplier_id","_category","_root_category","_attribute_set","_type","_product_websites","custom_design","msrp_display_actual_price_type","msrp_enabled","name","options_container","status","visibility","weight","qty","use_config_min_qty","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","use_config_qty_increments","use_config_enable_qty_inc"
"20M1","20","4368","16366","1004536","10190","","1","","anlasser Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)","","","120,00","Anlasser Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)"," laufleistung: 92300 Kmt<br>typen:<br>  Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)<br>kba: 1004536<br>   ","","","Root Catalog","Default","simple","base","default/galarainbow","Use config","Use config","anlasser Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)","Block after Info Column","1","4","1","1","1","1","1","1","1000","1","1","1","1","1","1","1","1"
"","","","","","","","","","","","","","","","","MOTOR","Root Catalog","","","","","","","","","","","","","","","","","","","","","","","","",""
"","","","","","","","","","","","","","","","","MOTOR/Startmotor","Root Catalog","","","","","","","","","","","","","","","","","","","","","","","","",""
"20M3","20","4368","16366","1004536","10230","","3","","lichtmaschine Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)","","","135,00","Lichtmaschine Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)"," laufleistung: 92300 Kmt<br>typen:<br>  Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)<br>kba: 1004536<br>   ","","","Root Catalog","Default","simple","base","default/galarainbow","Use config","Use config","lichtmaschine Chrysler Neon Ii (pl2000) 1.6  85 Kw  116 Ps (11.2001-12.2006)","Block after Info Column","1","4","1","1","1","1","1","1","1000","1","1","1","1","1","1","1","1"
"","","","","","","","","","","","","","","","","MOTOR","Root Catalog","","","","","","","","","","","","","","","","","","","","","","","","",""
"","","","","","","","","","","","","","","","","MOTOR/Dynamo","Root Catalog","","","","","","","","","","","","","","","","","","","","","","","","",""

【问题讨论】:

  • 这方面有什么进展吗?我在 Magento EE 1.14.0.1 上遇到了同样的问题
  • 没有进展。我有导出产品并导入相同的导出文件,这工作正常。但我的产品 csv 显示此错误。
  • 这对我有用。请在所有“默认”行中设置 _attribute_set 值。

标签: php mysql magento


【解决方案1】:

在所有行中重复属性集值(保留标题:_attribute_set),它为我解决了问题。

【讨论】:

  • 嗨,我试过了,但没用:/我只有 2 个产品(我正在测试)
【解决方案2】:

将第一行中的_attribute_set 更改为attribute_set 并尝试再次导入。

【讨论】:

  • 这对我有用。请在所有“默认”行中设置 _attribute_set 值
【解决方案3】:

更改此文件/home/deleshop/public_html/v2/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php

在出现错误的行前添加以下代码:

if (!empty($rowData['_attribute_set'])) {
    $_SESSION['_attribute_set'] = $rowData['_attribute_set'];
} elseif(!empty($_SESSION['_attribute_set'])){
    $rowData['_attribute_set'] = $_SESSION['_attribute_set'];
}

【讨论】:

    【解决方案4】:

    现在这对我有用。 请在所有“默认”行中设置 _attribute_set 值 就像上面的示例默认值没有在这 2 行中设置-

    "","","","","","","","","","","","","","","","","MOTOR","Root Catalog","Default","","","","","","","","","","","","","","","","","","","","","","","","" "","","","","","","","","","","","","","","","","MOTOR/Dynamo","Root Catalog","Default","","","","","","","","","","","","","","","","","","","","","","","",""
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-20
      • 1970-01-01
      • 1970-01-01
      • 2012-03-19
      • 1970-01-01
      • 2011-03-28
      • 2015-12-23
      相关资源
      最近更新 更多