我从magento admin导入产品csv然后在检查数据后点击导入按钮时显示错误。
注意:第1394行/home/deleshop/public_html/v2/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php中的未定义索引:_attribute_set
一些产品样本数据是:
" SKU"" manufacturer_code""模型""类型代码"" KBA"&# 34; category_code"" mounting_space"" PART_NUMBER"" REFERENCE_NUMBER""指定"" custom_thumbnail&#34 ;," custom_image""价格""备注1""注2"" supplier_id"&#34 ; _category"" _root_category"" _attribute_set"" _type"" _product_websites"" custom_design" " msrp_display_actual_price_type"" msrp_enabled""名称"" options_container""状态""能见度""重量""数量"" use_config_min_qty"" use_config_backorders"" min_sale_qty&#34 ;, " use_config_min_sale_qty"" max_sale_qty"" use_config_max_sale_qty"" is_in_stock"" notify_stock_qty"" use_config_notify_stock_qty& #34;" manage_stock"" use_config_manage_stock"" use_config_qty_increments&# 34;," use_config_enable_qty_inc"
" 20M1"" 20"" 4368"" 16366"" 1004536"" 10190& #34;,""," 1",""," alasser Chrysler Neon Ii(pl2000)1.6 85千克116 Ps(11.2001- 12.2006)","",""," 120,00"," Anlasser Chrysler Neon Ii(pl2000)1.6 85千瓦116 Ps(11.2001-12.2006)"," laufleistung:92300 Kmt
typen:
Chrysler Neon Ii(pl2000)1.6 85 Kw 116 Ps(11.2001-12.2006)
kba:1004536
"," ","","根目录","默认","简单"," base" ,"默认/ galarainbow","使用config","使用config"," alasser Chrysler Neon Ii(pl2000)1.6 85 Kw 116 Ps(11.2001) -12.2006)","阻止信息栏"," 1"," 4"," 1",&#34 1"" 1"" 1"" 1"" 1"" 1000" " 1"" 1"" 1"" 1"" 1"" 1"" 1"" 1"
"""""""""""& #34;"""""""""",& #34;"""""""""" MOTOR&# 34;,"根目录","","","","",& #34;""""""""""&# 34;,""""""""""&# 34;""""""""""&#34 ;,""""""""
"""""""""""& #34;"""""""""",& #34;""""""""""电动机/ Startmotor"," Root Catalog","","","","" """"""""""" #&34;,"""""""""&#34 ;, """""""""""& #34;""""""""
" 20M3"" 20"" 4368"" 16366"" 1004536"" 10230& #34;,""," 3",""," lichtmaschine克莱斯勒Neon Ii(pl2000)1.6 85千克116 Ps(11.2001- 12.2006)","",""," 135,00"," Lichtmaschine Chrysler Neon Ii(pl2000)1.6 85千瓦116 Ps(11.2001-12.2006)"," laufleistung:92300 Kmt
typen:
Chrysler Neon Ii(pl2000)1.6 85 Kw 116 Ps(11.2001-12.2006)
kba:1004536
"," ","","根目录","默认","简单"," base" ,"默认/ galarainbow","使用config","使用config"," lichtmaschine克莱斯勒Neon Ii(pl2000)1.6 85千欧116 Ps(11.2001) -12.2006)","阻止信息栏"," 1"," 4"," 1",&#34 1"" 1"" 1"" 1"" 1"" 1000" " 1"" 1"" 1"" 1"" 1"" 1"" 1"" 1"
"""""""""""& #34;"""""""""",& #34;"""""""""" MOTOR&# 34;,"根目录","","","","",& #34;""""""""""&# 34;,""""""""""&# 34;""""""""""&#34 ;,""""""""
"""""""""""& #34;"""""""""",& #34;""""""""""电动机/ Dynamo"," Root Catalog","","","","" """"""""""" #&34;,"""""""""&#34 ;, """""""""""& #34;""""""""
答案 0 :(得分:1)
在所有行中重复属性设置值(保留标题: _attribute_set ),它为我解决了问题。
答案 1 :(得分:0)
将第一行中的_attribute_set
更改为attribute_set
并尝试再次导入。
答案 2 :(得分:0)
现在这对我有用。请在所有行“默认”中设置_attribute_set值 与上面的示例中一样,默认情况下未在这两行中设置 -
“”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “” ,“MOTOR”,“Root Catalog”,“Default”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”, “”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”“”,“”,“”,“”,“”, “”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“MOTOR / Dynamo”,“根目录”,“默认”,“” , “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”,” ”, “”, “”, “”, “”, “” “”
答案 3 :(得分:0)
更改此文件/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'];
}