clickstream Posted June 28, 2007 Posted June 28, 2007 :( Hi, I need to change the sort order of the Payment Methods available to shoppers. This should be straightforward, go into the Admin Panel, edit each payment method and set the sort order as required. However, I've edited each entry ( 3 entries installed and turned on, cc, paypal and cheque/money order ) to try and change from 0 to 1,2 or 3 and each time the sort order value remains at 0. I've scoured this board for anyone with a similar problem and haven't seen anything, which makes me worry about the install - but if anyone can help, it would be MUCH appreciated. Mark
oschellas Posted June 28, 2007 Posted June 28, 2007 open the file [oscommerce-directory]/catalog/admin/modules.php (an editor that shows line-numbers would be good) it should look like this: -------------------------------------------------- [40] [41]$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); [42] [43] if (tep_not_null($action)) { [44] switch ($action) { [45] case 'save': [46] while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { [47] tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); [48] } [49] tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module'])); [50] break; [51] case 'install': -------------------------------------------------- all you have to do is to insert the line: reset($HTTP_POST_VARS['configuration']); between the lines 45 and 46 so the new file will look like this: -------------------------------------------------- [44] switch ($action) { [45] case 'save': [46] reset($HTTP_POST_VARS['configuration']); ///-new line-/// [47] while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { [48] tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); [49] } --------------------------------------------------
clickstream Posted June 28, 2007 Author Posted June 28, 2007 open the file [oscommerce-directory]/catalog/admin/modules.php(an editor that shows line-numbers would be good) it should look like this: -------------------------------------------------- [40] [41]$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); [42] [43] if (tep_not_null($action)) { [44] switch ($action) { [45] case 'save': [46] while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { [47] tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); [48] } [49] tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module'])); [50] break; [51] case 'install': -------------------------------------------------- all you have to do is to insert the line: reset($HTTP_POST_VARS['configuration']); between the lines 45 and 46 so the new file will look like this: -------------------------------------------------- [44] switch ($action) { [45] case 'save': [46] reset($HTTP_POST_VARS['configuration']); ///-new line-/// [47] while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { [48] tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); [49] } -------------------------------------------------- :rolleyes: :lol: :thumbsup: Thanks very much, this worked perfectly !!
SouthsideCigar Posted June 29, 2007 Posted June 29, 2007 Thanks, This actually also fixed my problem in another post were my changes to the shipping and payment modules were not being saved This forum is awesome. Dave
Recommended Posts
Archived
This topic is now archived and is closed to further replies.