Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NOOB-USPS methods problem


akmac

Recommended Posts

Can anyone tell me how to fix this?

 

Fatal error: Call to undefined function: tep_cfg_select_option() in /www/data/k2152/html/backadmin/modules.php(214) : eval()'d code on line 1

 

I get this error when I try to click "edit" in order to add my information to the module.

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Can anyone tell me how to fix this?

 

Fatal error: Call to undefined function: tep_cfg_select_option() in /www/data/k2152/html/backadmin/modules.php(214) : eval()'d code on line 1

 

I get this error when I try to click "edit" in order to add my information to the module.

 

tep_cfg_select_option is in includes/functions/general.php If you've edited general.php recently, chances are, that's where your problem is coming from. The actual function itself is:

 

  function tep_cfg_select_option($select_array, $key_value, $key = '') {
   $string = '';

   for ($i=0, $n=sizeof($select_array); $i<$n; $i++) {
     $name = ((tep_not_null($key)) ? 'configuration[' . $key . ']' : 'configuration_value');

     $string .= '<br><input type="radio" name="' . $name . '" value="' . $select_array[$i] . '"';

     if ($key_value == $select_array[$i]) $string .= ' CHECKED';

     $string .= '> ' . $select_array[$i];
   }

   return $string;
 }

 

You should confirm that this code is in general.php, and if it is, and you haven't done other modifications, replace your general.php file with a known working one. There are a few other things that will cause this problem, but start there.

 

Dan

Dan Stevens

Link to comment
Share on other sites

Dan, Thanks for the reply!

I did modify it for the USPS Methods mod. It looks like it added tep_cfg_multioption, but I'm still lost...

 

////

// Alias function for Store configuration values in the Administration Tool --MODIFIED with general.php_v1.148+USPSMethods_v2.2.diff

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;

}

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

I think I found part of the issue.

 

I copied over the existing function, instread of adding after it. I uncommented the original function and now it lets me edit it at least. Now to see if I can configure it wrong...;)

 

Thanks Dan!

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...