zen-cart网站,模版,采集,二次开发

首页 » ZenCart » ZenCart教程 » 阅读文章

ZenCart 1.5版Easy Populate CSV批量上传插件安装及bug修正

2012-10-11 00:45 201677 0 发表评论
标签:


Easy Populate CSV插件算是zencart上的老牌批量上传插件了,从ZenCart 1.38版开始就一直存在,更新到现在最新是1.2.5.7版了,不过在zencart1.5版有些bug

下载

本地修正版本下载

安装方法

1.将admin改为自己后台目录名然后上传文件

2.数据库安装上有2中方式

一、

直接导入install.sql导入,但是作者写的sql掉了一项,从而导致运行bug,且作者将Configuration定值为了id31,这样如果其他插件将id31占用的话就会导致导入失败,一下是修正

INSERT INTO admin_pages VALUES ('easyPopulate', 'BOX_TOOLS_EASY_POPULATE', 'FILENAME_EASYPOPULATE', '', 'tools', 'Y', '14');
INSERT INTO admin_pages_to_profiles VALUES ('1', 'easyPopulate');
INSERT INTO configuration_group VALUES ('', 'Easy Populate', 'Config options for Easy Populate', '31', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @typk4=0;
SELECT (@typk4:=configuration_group_id) as typk4
FROM configuration_group
WHERE configuration_group_title= 'Easy Populate';
INSERT INTO admin_pages VALUES ('easyPopulateConfig', 'BOX_CONFIGURATION_EASY_POPULATE', 'FILENAME_CONFIGURATION', CONCAT('gID=',@typk4), 'configuration', 'Y', '26');
INSERT INTO configuration VALUES
('', 'Uploads Directory', 'EASYPOPULATE_CONFIG_TEMP_DIR', 'tempEP/', 'Name of directory for your uploads (default: tempEP/).', @typk4, '0', NULL, now(), NULL, NULL),
('', 'Upload File Date Format', 'EASYPOPULATE_CONFIG_FILE_DATE_FORMAT', 'm-d-y', 'Choose order of date values that corresponds to your uploads file, usually generated by MS Excel. Raw dates in your uploads file (Eg 2005-09-26 09:00:00) are not affected, and will upload as they are.', @typk4, '1', NULL, now(), NULL, 'zen_cfg_select_option(array("m-d-y", "d-m-y", "y-m-d"),'),
('', 'Default Raw Time', 'EASYPOPULATE_CONFIG_DEFAULT_RAW_TIME', '09:00:00', 'If no time value stipulated in upload file, use this value. Useful for ensuring specials begin after a specific time of the day (default: 09:00:00)', @typk4, '2', NULL, now(), NULL, NULL),
('', 'Split File On # Records', 'EASYPOPULATE_CONFIG_SPLIT_MAX', '300', 'Default number of records for split-file uploads. Used to avoid timeouts on large uploads (default: 300).', @typk4, '3', NULL, now(), NULL, NULL),
('', 'Maximum Category Depth', 'EASYPOPULATE_CONFIG_MAX_CATEGORY_LEVELS', '7', 'Maximum depth of categories required for your store. Is the number of category columns in downloaded file (default: 7).', @typk4, '4', NULL, now(), NULL, NULL),
('', 'Upload/Download Prices Include Tax', 'EASYPOPULATE_CONFIG_PRICE_INC_TAX', 'false', 'Choose to include or exclude tax, depending on how you manage prices outside of Zen Cart.', @typk4, '5', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Make Zero Qty Products Inactive', 'EASYPOPULATE_CONFIG_ZERO_QTY_INACTIVE', 'false', 'When uploading, make the status Inactive for products with zero qty (default: false).', @typk4, '6', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Smart Tags Replacement of Newlines', 'EASYPOPULATE_CONFIG_SMART_TAGS', 'true', 'Allows your description fields in your uploads file to have carriage returns and/or new-lines converted to HTML line-breaks on uploading, thus preserving some rudimentary formatting (default: true).', @typk4, '7', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Advanced Smart Tags', 'EASYPOPULATE_CONFIG_ADV_SMART_TAGS', 'false', 'Allow the use of complex regular expressions to format descriptions, making headings bold, add bullets, etc. Configuration is in ADMIN/easypopulate.php (default: false).', @typk4, '8', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', 'Debug Logging', 'EASYPOPULATE_CONFIG_DEBUG_LOGGING', 'true', 'Allow Easy Populate to generate an error log on errors only (default: true)', @typk4, '9', NULL, now(), NULL, 'zen_cfg_select_option(array("true", "false"),'),
('', '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.', @typk4, '10', NULL, now(), NULL, NULL);

二、

通过url安装

进入后台后,运行http://www.xxx.com/you_admin/easypopulate.php?langer=installnew(注:并不是插件说明中写的langer=instal)

作者在方式二中,又漏掉了对插件对后台的挂钩显示,

admin\includes\functions\extra_functions\easypopulate_functions.php中查找

$group_id = mysql_insert_id();

在其下增加

	$db->Execute("INSERT INTO ".TABLE_ADMIN_PAGES." VALUES ('easyPopulate', 'BOX_TOOLS_EASY_POPULATE', 'FILENAME_EASYPOPULATE', '', 'tools', 'Y', '14')");
	$db->Execute("INSERT INTO ".TABLE_ADMIN_PAGES_TO_PROFILES." VALUES ('1', 'easyPopulate')");
	$db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);

查找

function remove_easypopulate() {
	global $db, $ep_keys;

在其下增加

	@$db->Execute("delete from " . TABLE_ADMIN_PAGES . "
	           where page_key = 'easyPopulate'");

	@$db->Execute("delete from " . TABLE_ADMIN_PAGES . "
	           where page_key = 'easyPopulateConfig'");

	@$db->Execute("delete from " . TABLE_ADMIN_PAGES_TO_PROFILES . "
	           where page_key = 'easyPopulate'");

卸载

后台运行http://www.xxx.com/you_admin/easypopulate.php?langer=remove,然后删除文件即可

相关日志:

评论 共0条 (RSS 2.0) 发表评论

  1. 暂无评论,快抢沙发吧。

发表评论

  • 
  • 插入代码

联系我 Contact Me

回到页首