Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to undefined function: tep_get_configuration_key_value


Guest

Recommended Posts

When I try an checkout on my site, this error appears:

 

Fatal error: Call to undefined function: tep_get_configuration_key_value() in /mounted-storage/home15a/sub003/sc17799-IEOR/tomrowley.net/catalog/checkout_shipping.php on line 18

 

any ideas wassup?

 

thanks in advance.

Tom

Link to comment
Share on other sites

What is line 18 in your checkout_shipping.php file?

 

It should be where the customer is being re-directed back to the login page because they are not logged in.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

LINE18: $navigation->set_snapshot();

LINE19: tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

 

 

is that correct???

Link to comment
Share on other sites

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

mine has this so it looks ok

Link to comment
Share on other sites

tep_get_configuration_key_value is called for in your checkout_shipping file but it is not defined.

 

I think that function has something to do with "download controller" .. I can't find the function in the stock osc files.

 

Whichever contribution it may be, double check the instructions. There should have been instructions to place

something beginning with 'function tep_get_configuration_key_value' somewhere in your files, normally somewhere in catalog/includes/functions. I would guess that step was missed.

Link to comment
Share on other sites

Basically that function is not part of the default osCommerce, so it looks like you've tried to install an add-on (contribution) and have failed to complete the install successfully.

 

Vger

Link to comment
Share on other sites

Hi,

 

Thanks for your responces. Yes I have tried to install the following contributions:

 

Download Controller

Master Products

OSPlayer

 

as I am trying to set-up an mp3 download site. I will retrace my steps on the download controller installation and let you know!

 

Thanks to everyone bearing with my questions. I have had no experience with PHP before, but am keen to learn, and hopefully, one day, give something back to the project.

 

A big thanks especially to Vger who's helped me with a few questions recently.

 

I'll keep you all posted :thumbsup:

 

Tom

Link to comment
Share on other sites

If you are going to be adding contributions then download and install a programme called Win Merge. It will compare two files side by side - the unedited one and the one from the contribution and highlight exactly where the changes have to be made.

 

Vger

Link to comment
Share on other sites

Hi all,

 

I've spent 3 hours trying to sort this out tonight, and have failed miserably. Still at square one ::'(:

 

If anyone would care to take a look at this for me, and help me on my way, I would be eternally grateful. I have not yet secured my admin, so please feel free to take a look (polite note to hackers - this is a genuine cry for help, please don't kill my site! I'm only try to learn! Spread the love instead!) Or alternatively, turning to bribary, gimme your PayPal details, and there's a pint in it for ya! :P

 

In need of a php/sql samartian.... Tom

Link to comment
Share on other sites

Hi Mark,

 

Yes I believe I do. Below is the scripting of it if thats any help /revelant

 

Thank you :)

 

<?php

/*

 

WebMakers.com Added: Downloads Controller Functions

NOTE: Some function may already exist in other Add-Ons I have created.

 

*/

?>

<?php

 

////

// BOF: WebMakers.com Added: configuration key value lookup

function tep_get_configuration_key_value($lookup) {

$configuration_query_raw= tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key='" . $lookup . "'");

$configuration_query= tep_db_fetch_array($configuration_query_raw);

$lookup_value= $configuration_query['configuration_value'];

return $lookup_value;

}

// EOF: WebMakers.com Added: configuration key value lookup

 

?>

Link to comment
Share on other sites

Tom,

 

Ok, cool.

 

I found this in the download controller instructions:

 

Admin Side

==========

 

Add one change to /admin/includes/functions/general.php just prior to the last ?> at the end of the file, add these lines of code:

 

// BOF: WebMakers.com Added: Downloads Controller

require(DIR_WS_FUNCTIONS . 'downloads_controller.php');

// EOF: WebMakers.com Added: Downloads Controller

 

 

NOTE: The function in the downloads_controller.php is a common one I use in my Add-ons.

This means if you get an error for trying to load a duplicate function, you probably do not need this change made to the general.php file.

 

 

=======================================================================

Catalog Side

=============

 

Add one change to /catalog/includes/functions/general.php just prior to the last ?> at the end of the file, add these lines of code:

 

// BOF: WebMakers.com Added: Downloads Controller

require(DIR_WS_FUNCTIONS . 'downloads_controller.php');

// EOF: WebMakers.com Added: Downloads Controller

 

 

NOTE: The function in the downloads_controller.php is a common one I use in my Add-ons.

This means if you get an error for trying to load a duplicate function, you probably do not need this change made to the general.php file.

 

Did you make those additions? Or did you do it and then remove it, because you encountered another different error, like the instructions imply...?

Link to comment
Share on other sites

  • 3 years later...

does anyone else have this problem. I have it and can't fix it.

 

i think i fixed it. time will tell.

 

in catalog/includes/classes/payment.php I changed this:

if (tep_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') and ($cart->show_total()==0 and $cart->show_weight==0)) {

 

to this:

$igotitfinally = tep_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS');
         if ($this->igotitfinally and ($cart->show_total()==0 and $cart->show_weight==0)) {

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...