loafer Posted June 29, 2009 Share Posted June 29, 2009 I have a problem with the USPS module that I can't seem to figure out. After I install the module I get the following error when I try to edit the form: Fatal error: Call to undefined function tep_cfg_select_multioption() in /home/bpwinech/public_html/goshop/admin/modules.php(341) : eval()'d code on line 1 I'm using version 3.0.2 of the USPS module if that is of any help. Thanks! Josh Link to comment Share on other sites More sharing options...
germ Posted June 29, 2009 Share Posted June 29, 2009 From the USPS Methods 2_9_5 install directions: ********** * STEP 6 * ********** catalog/admin/includes/functions/general.php ******************************************************************************** *********** IF YOU ARE USING UPSXML_v1_2_3_1 MOD - YOU CAN SKIP STEP #6 AS THE CODE IS ALREADY IN THERE ******************************************************************************** *********** ***************************************** Find This code somewhere around line 767: ***************************************** //// // Alias function for module configuration keys function tep_mod_select_option($select_array, $key_name, $key_value) { reset($select_array); while (list($key, $value) = each($select_array)) { if (is_int($key)) $key = $value; $string .= '<br><input type="radio" name="configuration[' . $key_name . ']" value="' . $key . '"'; if ($key_value == $key) $string .= ' CHECKED'; $string .= '> ' . $value; } return $string; } *********************************************** INSERT THE FOLLOWING CODE AFTER THE ABOVE LINE: *********************************************** // USPS Methods 2.9 // Alias function for Store configuration values in the Administration Tool function tep_cfg_select_multioption($select_array, $key_value, $key = '') { for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"'; $key_values = explode( ", ", $key_value); if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED'; $string .= '> ' . $select_array[$i]; } $string .= '<input type="hidden" name="' . $name . '" value="--none--">'; return $string; } **************************** SO IT SHOULD LOOK LIKE THIS: **************************** //// // Alias function for module configuration keys function tep_mod_select_option($select_array, $key_name, $key_value) { reset($select_array); while (list($key, $value) = each($select_array)) { if (is_int($key)) $key = $value; $string .= '<br><input type="radio" name="configuration[' . $key_name . ']" value="' . $key . '"'; if ($key_value == $key) $string .= ' CHECKED'; $string .= '> ' . $value; } return $string; } [color="#FF0000"]// USPS Methods 2.9 // Alias function for Store configuration values in the Administration Tool function tep_cfg_select_multioption($select_array, $key_value, $key = '') { for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"'; $key_values = explode( ", ", $key_value); if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED'; $string .= '> ' . $select_array[$i]; } $string .= '<input type="hidden" name="' . $name . '" value="--none--">'; return $string; }[/color] //// // Retreive server information function tep_get_system_information() { global $HTTP_SERVER_VARS; That may be the piece of the puzzle you're missing. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.