mvstudio:
Hello. I know this thread is a bit old, but the module seems promising and could be quite useful.
I've downloaded this plugin from https://github.com/Zen4All-nl/Zen-Cart-Order-Comments-Boilerplate
I too get the same error and more when trying to access the orders.php page. Actually the orders.php page goes blank.
Checking the database via phpAdmin the tables are not being created. The installer doesn't seem to be running. I was able to create the tables nonetheless, yet I still get errors in the admin area. Nothing is inserted in configuration_group in the database either.
This is the error I keep getting when trying to access the order_comment_boilerplate.php page. All files are in the correct place. I'm using v1.5.5e.
[04-May-2018 16:20:18 America/Denver] Request URI: /ADMIN/order_comment_boilerplate.php, IP address: xxxxxx
#1 trigger_error() called at [/home/koolwedd/public_html/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/public_html/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/public_html/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/public_html/pluMp-nRJ-crosS/includes/classes/split_page_results.php:40]
#5 splitPageResults->__construct() called at [/public_html/pluMp-nRJ-crosS/order_comment_boilerplate.php:306]
[04-May-2018 16:20:18 America/Denver] PHP Fatal error: 1146:Table 'XXXXX.order_comments_content' doesn't exist :: select count(*) as total FROM order_comments oc, order_comments_content occ WHERE oc.comment_id = occ.comment_id AND occ.language_id = '1' ==> (as called by) /public_html/pluMp-nRJ-crosS/includes/classes/split_page_results.php on line 40 <== in /public_html/includes/classes/db/mysql/query_factory.php on line 167
Any idea what could be the issue?
Thank you !
I fixed the installer and the issue has been resolved. It seems the installer is the one causing the problem at least for me. For anyone facing the same issue or the same errors, the corrected installer/order_comment_boilerplate/1_0_0.php below might do the trick. Hope it helps.
[PHP]
<?php
// use $configuration_group_id where needed
// For Admin Pages
$zc150 = (PROJECT_VERSION_MAJOR > 1 || (PROJECT_VERSION_MAJOR == 1 && substr(PROJECT_VERSION_MINOR, 0, 3) >= 5));
if ($zc150) { // continue Zen Cart 1.5.0
$admin_page = 'editOrderCommentBoilerplate';
// delete configuration menu
$db->Execute("DELETE FROM ".TABLE_ADMIN_PAGES." WHERE page_key = '".$admin_page."' LIMIT 1;");
// add configuration menu
if (!zen_page_key_exists($admin_page)) {
if ((int)$configuration_group_id > 0) {
zen_register_admin_page($admin_page,
'BOX_TOOLS_ORDER_COMMENT_BOILERPLATE',
'FILENAME_ORDER_COMMENT_BOILERPLATE',
'',
'tools',
'Y',
$configuration_group_id);
$messageStack->add('Enabled MODULE Configuration Menu.', 'success');
}
}
}
/*
* If your checking for a field
*/
$db->Execute("CREATE TABLE IF NOT EXISTS order_comments (
comment_id INT(11) NOT NULL AUTO_INCREMENT,
sort_order INT(3) DEFAULT NULL,
last_modified DATETIME NULL DEFAULT NULL,
date_added DATETIME NULL DEFAULT NULL,
PRIMARY KEY (comment_id),
KEY idx_sort_order_zen (sort_order)
) ENGINE = MyISAM;");
$db->Execute("CREATE TABLE IF NOT EXISTS order_comments_content (
comment_id INT(11) NOT NULL DEFAULT '0',
language_id INT(11) NOT NULL DEFAULT '1',
comment_title VARCHAR(64) NOT NULL,
comment_content TEXT NOT NULL,
PRIMARY KEY (comment_id,language_id),
KEY idx_comment_title_zen (comment_title)
) ENGINE = MyISAM;");
[/PHP]