jgkiefer Posted June 17, 2003 Posted June 17, 2003 I tried asking this question in the Shoppe Enhancement Controller thread and it was suggested I try to ask it in the UPS shipping forum. I could not find a UPS forum so I will as it here. I hope this is the right place. I am using SEC v1b with the OSC 5-18 snapshot. I want to limit the ups choices that are displayed to only ups ground. To do this I am trying to integrate the UPS Choice v1.7 contribution into SEC. This is a very simple contribution and I am having a problem with the code modification on the admin/modules.php. Around line 37 change: switch ($HTTP_GET_VARS['action']) { case 'save': while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); } To This: switch ($HTTP_GET_VARS['action']) { case 'save': while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { if( is_array( $value ) ) $value = implode( ", ", $value); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); } Except that with the SEC v1b admin/modules.php has been modified to switch ($HTTP_GET_VARS['action']) { case (ADMIN_DEMO): break; case 'save': while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); } I tried to just change the string while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { To if( is_array( $value ) ) $value = implode( ", ", $value); But that did not work. Anyone have an answer on how I might get the UPS Choice v1.7 contribution to work with the SEC v1b contribution? Quote
edwrdam Posted June 17, 2003 Posted June 17, 2003 No ... Add the if( is_array( $value ) ) $value = implode( ", ", $value); line below the while line ins the save case. 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.