jerry1970 Posted August 9, 2004 Posted August 9, 2004 The Wallie module has no sort_order. In some cases, this makes the module disappear for the users, as osCommerce's module.php overwrites the record MODULES_PAYMENT_INSTALLED record in the configuration table. Add this to the wallie function (the constructor): $this->sort_order = MODULE_PAYMENT_WALLIE_SORT_ORDER; And add this to the install function: tep_db_query("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_WALLIE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '4', now())"); And the keys function should look like this: function keys() { return array( 'MODULE_PAYMENT_WALLIE_STATUS', 'MODULE_PAYMENT_WALLIE_MERCHANT_ID', 'MODULE_PAYMENT_WALLIE_MERCHANT_PWD' //enable following line for OSCommerrce v 2.2 ,'MODULE_PAYMENT_WALLIE_ORDER_STATUS' ,'MODULE_PAYMENT_WALLIE_SORT_ORDER' ); } The real error is in the modules.php (around line 131): $class = substr($file, 0, strrpos($file, '.')); if (tep_class_exists($class)) { $module = new $class; if ($module->check() > 0) { if ($module->sort_order > 0) { // here the script should check if the key is not already in use $installed_modules[$module->sort_order] = $file; } else { // this is a way to temporarily solve it //$installed_modules[] = $file; $installed_modules[$class] = $file; } } To insert the sort order for Wallie if you have already installed the module, this is the SQL: INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Sort order of display.', 'MODULE_PAYMENT_WALLIE_SORT_ORDER', '4', 'Sort order of display. Lowest is displayed first.', 6, 0, '2004-08-08 23:12:24', '2004-08-08 23:12:24', NULL, NULL); NOTE: the SQL and code lines in the install function have NOT been tested!!! Jerry Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.