zencart批量上传,出现如下错误提示: ADD NEW PRODUCT FAILED! – Model: no200 – SQL error. Check Easy Populate error log in uploads directoryMySQL error 1054: Unknown column 'p.EASYPOPULATE_CONFIG_CUSTOM_FIELDS' in 'field list'。 Zen Cart开源网店系统是优秀的, 这点不用怀疑. Easy Populate 是方便的, 这点也不用怀疑. 从Zen Cart官网 下载的到目前为止最新的ep是v1.2.5.7版, 安装后发现了两个小问题:
watches for sale
1. install_sql 最后少了一行语句, 语句用于写入 `EASYPOPULATE_CONFIG_CUSTOM_FIELDS` 设置
2. /admin/easypopulate.php 多了两行语句, 这两行语句将引起执行错误, 典型的错误如下:
MySQL error 1110: Column 'products_last_modified' specified twice
When executing:
INSERT INTO zen_products SET
products_model = '10001' ,
products_price = '239' ,
products_image = 'images/10000.jpg' ,
products_weight = '0' ,
products_tax_class_id = '' ,
products_last_modified = '2009-11-07 10:43:00' ,
products_date_added = '2009-11-07 10:31:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '15' ,
master_categories_id = '55' ,
manufacturers_id = 'NULL',
products_status = '1',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = '0'
最模板解决方法:
1. 将install_sql最后一个 ” ; ” 替换为 ” , ” 并在下一行加入以下代码:
('', 'Custom Products Fields', 'EASYPOPULATE_CONFIG_CUSTOM_FIELDS', '', 'Enter a comma seperated list of fields to be automatically added to import/export file(ie: products_length, products_width). Please make sure field exists in PRODUCTS table.', " . last_insert_id() . ", '10', NULL, now(), NULL, NULL);
解决了1054错误问题。
或者在安装完成后 reinstall :
转到 Tools -> Easy Populate , 在地址栏最后加上 ” ?langer=remove ” 参数(不包括引号)并回车运行, 根据顶部提示点击 click 重装.
2. 错误原因是 `products_last_modified ` 字段重复定义, 将它们删除即可:
打开 /admin/easypopulate.php , 删除位于行 1776 与 1832 的两行代码即可.
|