
Originally Posted by
mc12345678
Between "INSERT INTO configuration" and "VALUES" need to add the field name(s) to which all of those characteristics/values belong.
For example, it appears that the first value of the SQL is the configuration_id and is using an OLD technique of asking the database to assign an empty set of quotes to an autonumber so that it will provide the next number... I say this is old, because no value needs to be provided for an autonumber field to provide the next autonumber... anyways, it would need to be edited to provide something similar to the following:
Code:
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
and then everything that follows from above after the VALUES statement.
That plugin though probably has other issues that will not work with current PHP versions, but I am not highly familiar with it and am likely wrong.

Originally Posted by
jiji2018
The following is the complete SQL statement, how to modify it?
Code:
# Install Easy Populate Configuration for zen cart v1.5
SET @configuration_group_id=0;
SELECT (@configuration_group_id:=configuration_group_id)
FROM configuration_group
WHERE configuration_group_title = 'Easy Populate'
LIMIT 1;
DELETE FROM configuration WHERE configuration_group_id = @configuration_group_id AND @configuration_group_id != 0;
DELETE FROM configuration_group WHERE configuration_group_id = @configuration_group_id AND @configuration_group_id != 0;
INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'Easy Populate', 'Config options for Easy Populate', '1', '1');
SET @configuration_group_id=last_insert_id();
UPDATE configuration_group SET sort_order = @configuration_group_id WHERE configuration_group_id = @configuration_group_id;
INSERT INTO configuration VALUES
('', 'Uploads Directory', 'EASYPOPULATE_CONFIG_TEMP_DIR', 'tempEP/', 'Name of directory for your uploads (default: tempEP/).', @configuration_group_id, '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.', @configuration_group_id, '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)', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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.', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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)', @configuration_group_id, '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.', @configuration_group_id, '10', NULL, now(), NULL, NULL);
INSERT INTO admin_pages VALUES ('easyPopulate', 'BOX_TOOLS_EASY_POPULATE', 'FILENAME_EASYPOPULATE', '', 'tools', 'Y', @configuration_group_id);
INSERT INTO admin_pages_to_profiles VALUES ('1', 'easyPopulate');
INSERT INTO admin_pages VALUES ('easyPopulateConfig', 'BOX_CONFIGURATION_EASY_POPULATE', 'FILENAME_CONFIGURATION', CONCAT('gID=',@configuration_group_id), 'configuration', 'Y', @configuration_group_id);
This portion:
Code:
NSERT INTO configuration VALUES
('', 'Uploads Directory', 'EASYPOPULATE_CONFIG_TEMP_DIR', 'tempEP/', 'Name of directory for your uploads (default: tempEP/).', @configuration_group_id, '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.', @configuration_group_id, '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)', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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.', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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)', @configuration_group_id, '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.', @configuration_group_id, '10', NULL, now(), NULL, NULL);
Looks like it should be replaced with this:
Code:
NSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
('', 'Uploads Directory', 'EASYPOPULATE_CONFIG_TEMP_DIR', 'tempEP/', 'Name of directory for your uploads (default: tempEP/).', @configuration_group_id, '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.', @configuration_group_id, '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)', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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.', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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).', @configuration_group_id, '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)', @configuration_group_id, '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.', @configuration_group_id, '10', NULL, now(), NULL, NULL);
Bookmarks