I have errors and the admin section is not listing the module as expected, I am not sure if there is a problem with a parameter, that fails to create the entries in the config file.
Here is the script so far:
check function
Install functionPHP Code:function check() {
global $db;
if (!isset($this->_check)) {
$check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_IC_STATUS'");
$this->_check = $check_query->RecordCount();
}
return $this->_check;
}
PHP Code:function install() {
global $db;
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable International Checkout Module', 'MODULE_PAYMENT_IC_STATUS', 'True', 'Do you want to accept International Checkout payments?', '6', '130', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_IC_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '131' , now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('International Checkout Company ID', 'MODULE_PAYMENT_IC_COMPANY', '', 'Company used for International Checkout payments', '6', '132', now())");
}
PHP Code:function remove() {
$db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
When I move it to includes/modules/payment/ I get errors and nothing is written to the db ...PHP Code:function keys() {
return array('MODULE_PAYMENT_IC_STATUS', 'MODULE_PAYMENT_IC_SORT_ORDER', 'MODULE_PAYMENT_IC_COMPANY');




